Moving image encoding device, moving image encoding method, moving image encoding program, moving image decoding device, moving image decoding method, and moving image decoding program

ABSTRACT

In order to provide low-load, efficient coding technology, a moving-picture decoding device includes a spatial motion information candidate derivation unit configured to derive a spatial motion information candidate from motion information of a block neighboring a decoding target block in a space domain and a history-based motion information candidate derivation unit configured to derive a history-based motion information candidate from a memory where motion information of a decoded block is retained, wherein the history-based motion information candidate derivation unit preferentially derives old motion information without making a comparison of the motion information with the spatial motion information candidate.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a U.S. National Stage entry of PCT Application No:PCT/JP2019/050004 filed on Dec. 20, 2019, which claims priority toJapanese Patent Application Nos. 2018-247405 filed Dec. 28, 2018 and2019-082763 filed Apr. 24, 2019, the contents of which are incorporatedherein by reference.

TECHNICAL FIELD

The present invention relates to picture coding and decoding technologyfor dividing a picture into blocks and performing prediction.

BACKGROUND ART

In picture coding and decoding, a target picture is divided into blocks,each of which is a set of a prescribed number of samples, and a processis performed in units of blocks. Coding efficiency is improved bydividing a picture into appropriate blocks and appropriately settingintra picture prediction (intra prediction) and inter picture prediction(inter prediction).

In moving-picture coding/decoding, coding efficiency is improved byinter prediction for performing prediction from a coded/decoded picture.Patent Literature 1 describes technology for applying an affinetransform at the time of inter prediction. It is not uncommon for anobject to cause deformation such as enlargement/reduction and rotationin moving pictures, and efficient coding is enabled by applying thetechnology of Patent Literature 1.

CITATION LIST Patent Literature

[Patent Literature 1]

Japanese Unexamined Patent Application, First Publication No. H9-172644

SUMMARY OF INVENTION Technical Problem

However, because the technology of Patent Literature 1 involves apicture transform, there is a problem that the processing load is great.In view of the above problem, the present invention provides efficientcoding technology with a low load.

Solution to Problem

According to an aspect of the present invention for solving theabove-described problems, there is provided a moving-picture codingdevice including: a spatial motion information candidate derivation unitconfigured to derive a spatial motion information candidate from motioninformation of a block neighboring a coding target block in a spacedomain; and a history-based motion information candidate derivation unitconfigured to derive a history-based motion information candidate from amemory where motion information of a coded block is retained, whereinthe history-based motion information candidate derivation unitpreferentially derives old motion information without making acomparison of the motion information with the spatial motion informationcandidate.

Also, according to another aspect of the present invention, there isprovided a moving-picture coding method including: a first process ofderiving a spatial motion information candidate from motion informationof a block neighboring a coding target block in a space domain; and asecond process of deriving a history-based motion information candidatefrom a memory where motion information of a coded block is retained,wherein the second process includes preferentially deriving old motioninformation without making a comparison of the motion information withthe spatial motion information candidate.

Also, according to yet another aspect of the present invention, there isprovided a moving-picture coding program for causing a computer tooperate as: a spatial motion information candidate derivation unitconfigured to derive a spatial motion information candidate from motioninformation of a block neighboring a coding target block in a spacedomain; and a history-based motion information candidate derivation unitconfigured to derive a history-based motion information candidate from amemory where motion information of a coded block is retained, whereinthe history-based motion information candidate derivation unitpreferentially derives old motion information without making acomparison of the motion information with the spatial motion informationcandidate.

Also, according to still another aspect of the present invention, thereis provided a picture decoding device including: a spatial motioninformation candidate derivation unit configured to derive a spatialmotion information candidate from motion information of a blockneighboring a decoding target block in a space domain; and ahistory-based motion information candidate derivation unit configured toderive a history-based motion information candidate from a memory wheremotion information of a decoded block is retained, wherein thehistory-based motion information candidate derivation unitpreferentially derives old motion information without making acomparison of the motion information with the spatial motion informationcandidate.

Also, according to still another aspect of the present invention, thereis provided a picture decoding method including: a first process ofderiving a spatial motion information candidate from motion informationof a block neighboring a decoding target block in a space domain; and asecond process of deriving a history-based motion information candidatefrom a memory where motion information of a decoded block is retained,wherein the second process includes preferentially deriving old motioninformation without making a comparison of the motion information withthe spatial motion information candidate.

Also, according to still another aspect of the present invention, thereis provided a picture decoding program for causing a computer to operateas: a spatial motion information candidate derivation unit configured toderive a spatial motion information candidate from motion information ofa block neighboring a decoding target block in a space domain; and ahistory-based motion information candidate derivation unit configured toderive a history-based motion information candidate from a memory wheremotion information of a decoded block is retained, wherein thehistory-based motion information candidate derivation unitpreferentially derives old motion information without making acomparison of the motion information with the spatial motion informationcandidate.

Advantageous Effects of Invention

According to the present invention, it is possible to implement a highlyefficient picture coding/decoding process with a low load.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram of a picture coding device according to anembodiment of the present invention.

FIG. 2 is a block diagram of a picture decoding device according to anembodiment of the present invention.

FIG. 3 is an explanatory flowchart showing an operation of dividing atree block.

FIG. 4 is a diagram showing a state in which an input picture is dividedinto tree blocks.

FIG. 5 is an explanatory diagram showing Z-scan.

FIG. 6A is a diagram showing a divided shape of a block.

FIG. 6B is a diagram showing a divided shape of a block.

FIG. 6C is a diagram showing a divided shape of a block.

FIG. 6D is a diagram showing a divided shape of a block.

FIG. 6E is a diagram showing a divided shape of a block.

FIG. 7 is an explanatory flowchart showing an operation of dividing ablock into four parts.

FIG. 8 is an explanatory flowchart showing an operation of dividing ablock into two or three parts.

FIG. 9 is syntax for expressing a shape of a block split.

FIG. 10A is an explanatory diagram showing intra prediction.

FIG. 10B is an explanatory diagram showing intra prediction.

FIG. 11 is an explanatory diagram showing a reference block of interprediction.

FIG. 12 is syntax for expressing a coding block prediction mode.

FIG. 13 is a diagram showing correspondence between a syntax elementrelated to inter prediction and a mode.

FIG. 14 is an explanatory diagram showing affine motion compensation oftwo control points.

FIG. 15 is an explanatory diagram showing affine motion compensation ofthree control points.

FIG. 16 is a block diagram of a detailed configuration of an interprediction unit 102 of FIG. 1 .

FIG. 17 is a block diagram of a detailed configuration of a normalmotion vector predictor mode derivation unit 301 of FIG. 16 .

FIG. 18 is a block diagram of a detailed configuration of a normal mergemode derivation unit 302 of FIG. 16 .

FIG. 19 is an explanatory flowchart showing a normal motion vectorpredictor mode derivation process of the normal motion vector predictormode derivation unit 301 of FIG. 16 .

FIG. 20 is a flowchart showing a processing procedure of the normalmotion vector predictor mode derivation process.

FIG. 21 is an explanatory flowchart showing a processing procedure of anormal merge mode derivation process.

FIG. 22 is a block diagram of a detailed configuration of an interprediction unit 203 of FIG. 2 .

FIG. 23 is a block diagram of a detailed configuration of a normalmotion vector predictor mode derivation unit 401 of FIG. 22 .

FIG. 24 is a block diagram of a detailed configuration of a normal mergemode derivation unit 402 of FIG. 22 .

FIG. 25 is an explanatory flowchart showing a normal motion vectorpredictor mode derivation process of the normal motion vector predictormode derivation unit 401 of FIG. 22 .

FIG. 26 is an explanatory diagram showing a processing procedure ofinitializing/updating a history-based motion vector predictor candidatelist.

FIG. 27 is a flowchart of an identical element checking processingprocedure in the processing procedure of initializing/updating ahistory-based motion vector predictor candidate list.

FIG. 28 is a flowchart of an element shift processing procedure in theprocessing procedure of initializing/updating a history-based motionvector predictor candidate list.

FIG. 29 is an explanatory flowchart showing a history-based motionvector predictor candidate derivation processing procedure.

FIG. 30 is an explanatory flowchart showing a history-based mergingcandidate derivation processing procedure.

FIG. 31A is an explanatory diagram showing an example of a history-basedmotion vector predictor candidate list update process.

FIG. 31B is an explanatory diagram showing an example of a history-basedmotion vector predictor candidate list update process.

FIG. 31C is an explanatory diagram showing an example of a history-basedmotion vector predictor candidate list update process.

FIG. 32 is an explanatory diagram showing motion-compensated predictionwhen a clock time of a reference picture (RefL0Pic) of L0 is earlierthan that of a target picture (CurPic) as L0-prediction.

FIG. 33 is an explanatory diagram showing motion-compensated predictionwhen a clock time of a reference picture of L0-prediction is later thanthat of a target picture as L0-prediction.

FIG. 34 is an explanatory diagram showing a prediction direction ofmotion-compensated prediction when a clock time of a reference pictureof L0-prediction is earlier than that of a target picture and a clocktime of a reference picture of L1-prediction is later than that of atarget picture as bi-prediction.

FIG. 35 is an explanatory diagram showing a prediction direction ofmotion-compensated prediction when a clock time of a reference pictureof L0-prediction and a clock time of a reference picture ofL1-prediction are earlier than that of a target picture asbi-prediction.

FIG. 36 is an explanatory diagram showing a prediction direction ofmotion-compensated prediction when a clock time of a reference pictureof L0-prediction and a clock time of a reference picture ofL1-prediction are later than that of a target picture as bi-prediction.

FIG. 37 is an explanatory diagram showing an example of a hardwareconfiguration of a coding/decoding device according to an embodiment ofthe present invention.

FIG. 38 is a flowchart for describing a history-based motion vectorpredictor candidate derivation processing procedure in the case of aconfiguration in which an identical candidate removal process is notperformed, and a history-based motion vector predictor candidate list isused with reference to motion information in order from oldest motioninformation to newly added motion information.

FIG. 39 is a flowchart of a processing procedure of shifting and addingan element of a history motion vector predictor candidate list.

FIG. 40 is a flowchart for describing a history-based merging candidatederivation processing procedure in the case of a configuration in whichan identical candidate removal process is not performed, and ahistory-based motion vector predictor candidate list is used withreference to motion information in order from oldest motion informationto newly added motion information.

FIG. 41 is an explanatory diagram showing a configuration of ahistory-based motion vector predictor candidate list.

FIG. 42 is an explanatory diagram showing a state in which an element atthe beginning of the history-based motion vector predictor candidatelist is removed at the time of addition to the history-based motionvector predictor candidate list.

FIG. 43 is an explanatory diagram showing a state in which each elementis shifted within the history-based motion vector predictor candidatelist at the time of addition to the history-based motion vectorpredictor candidate list.

FIG. 44 is an explanatory diagram showing a state in which a new elementis added at the time of addition to the history-based motion vectorpredictor candidate list.

FIG. 45 is a diagram for describing reference order of the history-basedmotion vector predictor candidate list.

FIG. 46 is a diagram for describing reference order of the history-basedmotion vector predictor candidate list.

FIG. 47 is a flowchart for describing a history-based motion vectorpredictor candidate derivation processing procedure in the case of aconfiguration in which an identical candidate removal process is notperformed, and a history-based motion vector predictor candidate list isused with reference in reverse order, which is the reverse of storageorder.

FIG. 48 is a flowchart for describing a history-based motion vectorpredictor candidate derivation processing procedure in the case of aconfiguration in which an identical candidate removal process isperformed using a history-based motion vector predictor candidate listwith reference in reverse order, which is the reverse of storage order.

DESCRIPTION OF EMBODIMENTS

Technology and technical terms used in the embodiment will be defined.

<Tree Block>

In the embodiment, a coding/decoding target picture is equally dividedinto units of a predetermined size. This unit is defined as a treeblock. Although the size of the tree block is 128×128 samples in FIG. 4, the size of the tree block is not limited thereto and any size may beset. The tree block of a target (corresponding to a coding target in acoding process or a decoding target in the decoding process) is switchedin a raster scan order, i.e., from left to right and from top to bottom.The inside of each tree block can be further recursively divided. Ablock which is a coding/decoding target after the tree block isrecursively divided is defined as a coding block. Also, a tree block anda coding block are collectively defined as blocks. Efficient coding isenabled by performing an appropriate block split. The tree block sizemay be a fixed value predetermined by the coding device and the decodingdevice or the tree block size determined by the coding device may beconfigured to be transmitted to the decoding device. Here, a maximumsize of the tree block is 128×128 samples and a minimum size of the treeblock is 16×16 samples. Also, a maximum size of the coding block is64-64 samples and a minimum size of the coding block is 4×4 samples.

<Prediction Mode>

Switching is performed between intra prediction (MODE_INTRA) in whichprediction is performed from a processed picture signal of the targetpicture and inter prediction (MODE_INTER) in which prediction isperformed from a picture signal of a processed picture in units oftarget coding blocks.

The processed picture is used for a picture, a picture signal, a treeblock, a block, a coding block, and the like obtained by decoding asignal completely coded in the coding process and is used for a picture,a picture signal, a tree block, a block, a coding block, and the likeobtained by completing decoding in a decoding process.

The mode in which the intra prediction (MODE_INTRA) and the interprediction (MODE_INTER) are identified is defined as the prediction mode(PredMode). The prediction mode (PredMode) has intra prediction(MODE_INTRA) or inter prediction (MODE_INTER) as a value.

<Inter Prediction>

In inter prediction in which prediction is performed from a picturesignal of a processed picture, a plurality of processed pictures can beused as reference pictures. In order to manage a plurality of referencepictures, two types of reference lists of L0 (reference list 0) and L1(reference list 1) are defined, and a reference picture is identifiedusing each reference index. In a P slice, L0-prediction (Pred_L0) can beused. In a B slice, L0-prediction (Pred_L0), L1-prediction (Pred_L1),and bi-prediction (Pred_BI) can be used. The L0-prediction (Pred_L0) isinter prediction that refers to a reference picture managed in L0, andthe L1-prediction (Pred_L1) is inter prediction that refers to areference picture managed in L1. The bi-prediction (Pred_BI) is interprediction in which both the L0-prediction and the L1-prediction areperformed and one reference picture managed in each of L0 and L1 isreferred to. Information for identifying the L0-prediction, theL1-prediction, and the bi-prediction is defined as an inter predictionmode. In the subsequent processing, constants and variables with thesubscript LX in the output are assumed to be processed for each of L0and L1.

<Motion Vector Predictor Mode>

The motion vector predictor mode is a mode for transmitting an index foridentifying a motion vector predictor, a motion vector difference, aninter prediction mode, and a reference index and determining interprediction information of a target block. The motion vector predictor isderived from a motion vector predictor candidate derived from aprocessed block neighboring the target block or a block located at thesame position as or in the vicinity of (near) the target block amongblocks belonging to the processed picture and an index for identifying amotion vector predictor.

<Merge Mode>

The merge mode is a mode in which inter prediction information of atarget block is derived from inter prediction information of a processedblock neighboring a target block or a block located at the same positionas or in the vicinity of (near) the target block among blocks belongingto the processed picture without transmitting a motion vector differenceand a reference index.

The processed block neighboring the target block and the interprediction information of the processed block are defined as spatialmerging candidates. The block located at the same position as or in thevicinity of (near) the target block among the blocks belonging to theprocessed picture and inter prediction information derived from theinter prediction information of the block are defined as temporalmerging candidates. Each merging candidate is registered in a mergingcandidate list, and a merging candidate used for prediction of a targetblock is identified by a merge index.

<Neighboring Block>

FIG. 11 is an explanatory diagram showing a reference block that isreferred to in deriving inter prediction information in the motionvector predictor mode and the merge mode. A0, A1, A2, B0, B1, B2, and B3are processed blocks neighboring the target block. TO is a block locatedat the same position as or in the vicinity of (near) the target block inthe target picture among blocks belonging to the processed picture.

A1 and A2 are blocks located on the left side of the target coding blockand neighboring the target coding block. B1 and B3 are blocks located onthe upper side of the target coding block and neighboring the targetcoding block. A0, B0, and B2 are blocks located at the lower left, upperright, and upper left of the target coding block, respectively.

Details of how to handle neighboring blocks in the motion vectorpredictor mode and the merge mode will be described below.

<Affine Motion Compensation>

The affine motion compensation is a process of performing motioncompensation by dividing a coding block into subblocks of apredetermined unit and individually determining a motion vector for eachof the subblocks into which the coding block is divided. The motionvector of each subblock is derived on the basis of one or more controlpoints derived from inter prediction information of a processed blockneighboring the target block or a block located at the same position asor in the vicinity of (near) the target block among blocks belonging tothe processed picture. Although the size of the subblock is 4×4 samplesin the present embodiment, the size of the subblock is not limitedthereto and a motion vector may be derived in units of samples.

An example of affine motion compensation in the case of two controlpoints is shown in FIG. 14 . In this case, the two control points havetwo parameters of a horizontal direction component and a verticaldirection component. Thus, an affine transform in the case of twocontrol points is referred to as a four-parameter affine transform. CP1and CP2 of FIG. 14 are control points.

An example of affine motion compensation in the case of three controlpoints is shown in FIG. 15 . In this case, the three control points havetwo parameters of a horizontal direction component and a verticaldirection component. Thus, an affine transform in the case of threecontrol points is referred to as a six-parameter affine transform. CP1,CP2, and CP3 of FIG. 15 are control points.

Affine motion compensation can be used in both the motion vectorpredictor mode and the merge mode. A mode in which the affine motioncompensation is applied in the motion vector predictor mode is definedas a subblock-based motion vector predictor mode, and a mode in whichthe affine motion compensation is applied in the merge mode is definedas a subblock-based merge mode.

<Inter Prediction Syntax>

The syntax related to inter prediction will be described using FIGS. 12and 13 .

The flag merge_flag in FIG. 12 indicates whether the target coding blockis set to the merge mode or the motion vector predictor mode. The flagmerge_affine_flag indicates whether or not the subblock-based merge modeis applied to the target coding block of the merge mode. The flaginter_affie_flag indicates whether or not to apply the subblock-basedmotion vector predictor mode to the target coding block of the motionvector predictor mode. The flag cu_affine_type_flag is used to determinethe number of control points in the subblock-based motion vectorpredictor mode.

FIG. 13 shows a value of each syntax element and a prediction methodcorresponding thereto. The normal merge mode corresponds to merge_flag=1and merge_affine_flag=0 and is not a subblock-based merge mode. Thesubblock-based merge mode corresponds to merge_flag=1 andmerge_affine_flag=1. The normal motion vector predictor mode correspondsto merge_flag=0 and inter_affine_flag=0. The normal motion vectorpredictor mode is a motion vector predictor merge mode that is not asubblock-based motion vector predictor mode. The subblock-based motionvector predictor mode corresponds to merge_flag=4 andinter_affine_flag=1. When merge_flag=0 and inter_affine_flag=1,cu_affine_type_flag is further transmitted to determine the number ofcontrol points.

<POC>

A picture order count (POC) is a variable associated with a picture tobe coded and is set to a value that is incremented by 1 according to anoutput order of pictures. According to the POC value, it is possible todiscriminate whether pictures are the same, to discriminate ananteroposterior relationship between pictures in the output order, or toderive the distance between pictures. For example, if the POCs of twopictures have the same value, it can be determined that they are thesame picture. When the POCs of two pictures have different values, itcan be determined that the picture with the smaller POC value is thepicture to be output first. A difference between the POCs of the twopictures indicates an inter-picture distance in a time axis direction.

First Embodiment

The picture coding device 100 and the picture decoding device 200according to the first embodiment of the present invention will bedescribed.

FIG. 1 is a block diagram of a picture coding device 100 according tothe first embodiment. The picture coding device 100 according to theembodiment includes a block split unit 101, an inter prediction unit102, an intra prediction unit 103, a decoded picture memory 104, aprediction method determination unit 105, a residual generation unit106, an orthogonal transform/quantization unit 107, a bit strings codingunit 108, an inverse quantization/inverse orthogonal transform unit 109,a decoding picture signal superimposition unit 110, and a codinginformation storage memory 111.

The block split unit 101 recursively divides the input picture togenerate a coding block. The block split unit 101 includes a quad splitunit that divides a split target block in the horizontal direction andthe vertical direction and a binary-ternary split unit that divides thesplit target block in either the horizontal direction or the verticaldirection. The block split unit 101 sets the generated coding block as atarget coding block and supplies a picture signal of the target codingblock to the inter prediction unit 102, the intra prediction unit 103,and the residual generation unit 106. Also, the block split unit 101supplies information indicating a determined recursive split structureto the bit strings coding unit 108. The detailed operation of the blocksplit unit 101 will be described below.

The inter prediction unit 102 performs inter prediction of the targetcoding block. The inter prediction unit 102 derives a plurality of interprediction information candidates from the inter prediction informationstored in the coding information storage memory 111 and the decodedpicture signal stored in the decoded picture memory 104, selects asuitable inter prediction mode from the plurality of derived candidates,and supplies the selected inter prediction mode and a predicted picturesignal according to the selected inter prediction mode to the predictionmethod determination unit 105. A detailed configuration and operation ofthe inter prediction unit 102 will be described below.

The intra prediction unit 103 performs intra prediction of the targetcoding block. The intra prediction unit 103 refers to a decoded picturesignal stored in the decoded picture memory 104 as a reference sampleand generates a predicted picture signal according to intra predictionbased on coding information such as an intra prediction mode stored inthe coding information storage memory 111. In the intra prediction, theintra prediction unit 103 selects a suitable intra prediction mode fromamong a plurality of intra prediction modes and supplies a selectedintra prediction mode and a predicted picture signal according to theselected intra prediction mode to the prediction method determinationunit 105.

Examples of intra prediction are shown in FIGS. 10A and 10B. FIG. 10Ashows the correspondence between a prediction direction of intraprediction and an intra prediction mode number. For example, in intraprediction mode 50, an intra prediction picture is generated by copyingreference samples in the vertical direction. Intra prediction mode 1 isa DC mode and is a mode in which all sample values of the target blockare an average value of reference samples. Intra prediction mode 0 is aplanar mode and is a mode for creating a two-dimensional intraprediction picture from reference samples in the vertical and horizontaldirections. FIG. 10B is an example in which an intra prediction pictureis generated in the case of intra prediction mode 40. The intraprediction unit 103 copies the value of the reference sample in thedirection indicated by the intra prediction mode with respect to eachsample of the target block. When the reference sample of the intraprediction mode is not at an integer position, the intra prediction unit103 determines a reference sample value according to an interpolationfrom reference sample values of neighboring integer positions.

The decoded picture memory 104 stores a decoded picture generated by thedecoding picture signal superimposition unit 110. The decoded picturememory 104 supplies the stored decoded picture to the inter predictionunit 102 and the intra prediction unit 103.

The prediction method determination unit 105 determines the optimumprediction mode by evaluating each of intra prediction and interprediction using coding information, a residual code amount, an amountof distortion between a predicted picture signal and a target picturesignal, and the like. In the case of intra prediction, the predictionmethod determination unit 105 supplies intra prediction information suchas an intra prediction mode as the coding information to the bit stringscoding unit 108. In the case of the inter prediction merge mode, theprediction method determination unit 105 supplies inter predictioninformation such as a merge index and information indicating whether ornot the mode is a subblock-based merge mode (a subblock-based mergeflag) as the coding information to the bit strings coding unit 108. Inthe case of the motion vector predictor mode of inter prediction, theprediction method determination unit 105 supplies inter predictioninformation such as the inter prediction mode, a motion vector predictorindex, reference indices of L0 and L1, a motion vector difference, andinformation indicating whether or not the mode is a subblock-basedmotion vector predictor mode (a subblock-based motion vector predictorflag) as the coding information to the bit strings coding unit 108.Further, the prediction method determination unit 105 supplies thedetermined coding information to the coding information storage memory111. The prediction method determination unit 105 supplies a predictedpicture signal to the residual generation unit 106 and the decodingpicture signal superimposition unit 110.

The residual generation unit 106 generates a residual by subtracting thepredicted picture signal from the target picture signal and supplies theresidual to the orthogonal transform/quantization unit 107.

The orthogonal transform/quantization unit 107 performs an orthogonaltransform and quantization on the residual in accordance with thequantization parameter to generate an orthogonally transformed/quantizedresidual and supplies the generated residual to the bit strings codingunit 108 and the inverse quantization/inverse orthogonal transform unit109.

The bit strings coding unit 108 codes coding information according tothe prediction method determined by the prediction method determinationunit 105 for each coding block in addition to information of units ofsequences, pictures, slices, and coding blocks. Specifically, the bitstrings coding unit 108 codes the prediction mode PredMode for eachcoding block. When the prediction mode is inter prediction (MODE_INTER),the bit strings coding unit 108 codes coding information (interprediction information) such as a flag for discriminating whether or notthe mode is a merge mode, a subblock-based merge flag, a merge indexwhen the mode is the merge mode, an inter prediction mode when the modeis not the merge mode, a motion vector predictor index, informationabout a motion vector difference, and a subblock-based motion vectorpredictor flag in accordance with specified syntax (a bit strings syntaxrule), and generates first bit strings. When the prediction mode isintra prediction (MODE_INTRA), coding information (intra predictioninformation) such as the intra prediction mode is coded in accordancewith specified syntax (a bit strings syntax rule) and first bit stringsare generated. Also, the bit strings coding unit 108 entropy-codes theorthogonally transformed and quantized residual in accordance withspecified syntax to generate second bit strings. The bit strings codingunit 108 multiplexes the first bit strings and the second bit strings inaccordance with specified syntax and outputs a bitstream.

The inverse quantization/inverse orthogonal transform unit 109calculates the residual by performing inverse quantization and aninverse orthogonal transform on the orthogonally transformed/quantizedresidual supplied from the orthogonal transform/quantization unit 107and supplies the calculated residual to the decoding picture signalsuperimposition unit 110.

The decoding picture signal superimposition unit 110 superimposes thepredicted picture signal according to the determination of theprediction method determination unit 105 and the residual inverselyquantized and inversely orthogonally transformed by the inversequantization/inverse orthogonal transform unit 109 to generate a decodedpicture and stores the decoded picture in the decoded picture memory104. Also, the decoding picture signal superimposition unit 110 maystore the decoded picture in the decoded picture memory 104 afterperforming a filtering process of reducing distortion such as blockdistortion due to coding on the decoded picture.

The coding information storage memory 111 stores coding information suchas a prediction mode (inter prediction or intra prediction) determinedby the prediction method determination unit 105. In the case of theinter prediction, the coding information stored in the codinginformation storage memory 111 includes inter prediction informationsuch as a determined motion vector, reference indices of reference listsL0 and L1, and a history-based motion vector predictor candidate list.Also, in the case of the inter prediction merge mode, the codinginformation stored in the coding information storage memory 111 includesinter prediction information such as a merge index and informationindicating whether or not the mode is the subblock-based merge mode (asubblock-based merge flag) in addition to the above-describedinformation. Also, in the case of the motion vector predictor mode ofthe inter prediction, the coding information stored in the codinginformation storage memory 111 includes inter prediction informationsuch as an inter prediction mode, a motion vector predictor index, amotion vector difference, and information indicating whether or not themode is the subblock-based motion vector predictor mode (asubblock-based motion vector predictor flag) in addition to theabove-described information. In the case of the intra prediction, thecoding information stored in the coding information storage memory 111includes intra prediction information such as the determined intraprediction mode.

FIG. 2 is a block diagram showing a configuration of the picturedecoding device according to the embodiment of the present inventioncorresponding to the picture coding device of FIG. 1 . The picturedecoding device according to the embodiment includes a bit stringsdecoding unit 201, a block split unit 202, an inter prediction unit 203,an intra prediction unit 204, a coding information storage memory 205,an inverse quantization/inverse orthogonal transform unit 206, adecoding picture signal superimposition unit 207, and a decoded picturememory 208.

Because a decoding process of the picture decoding device of FIG. 2corresponds to a decoding process provided in the picture coding deviceof FIG. 1 , the components of the coding information storage memory 205,the inverse quantization/inverse orthogonal transform unit 206, thedecoding picture signal superimposition unit 207, and the decodedpicture memory 208 of FIG. 2 have functions corresponding to thecomponents of the coding information storage memory 111, the inversequantization/inverse orthogonal transform unit 109, the decoding picturesignal superimposition unit 110, and the decoded picture memory 104 ofthe picture coding device of FIG. 1 .

A bitstream supplied to the bit strings decoding unit 201 is separatedin accordance with a specified syntax rule. The bit strings decodingunit 201 decodes a separated first bit string, and obtains informationof units of sequences, pictures, slices, coding blocks, and codinginformation of units of coding blocks. Specifically, the bit stringsdecoding unit 201 decodes a prediction mode PredMode for discriminatinginter prediction (MODE_INTER) or intra prediction (MODE_INTRA) in unitsof coding blocks. When the prediction mode is inter prediction(MODE_INTER), the bit strings decoding unit 201 decodes codinginformation (inter prediction information) about a flag fordiscriminating whether or not the mode is a merge mode, a merge indexwhen the mode is the merge mode, a subblock-based merge flag, an interprediction mode when the mode is a motion vector predictor mode, amotion vector predictor index, a motion vector difference, asubblock-based motion vector predictor flag, and the like in accordancewith specified syntax, and supplies the coding information (the interprediction information) to the coding information storage memory 205 viathe inter prediction unit 203 and the block split unit 202. When theprediction mode is intra prediction (MODE_INTRA), coding information(intra prediction information) such as the intra prediction mode isdecoded in accordance with specified syntax, and the coding information(the intra prediction information) is supplied to the coding informationstorage memory 205 via the inter prediction unit 203 or the intraprediction unit 204 and the block split unit 202. The bit stringsdecoding unit 201 decodes separated second bit strings to calculate anorthogonally transformed/quantized residual and supplies theorthogonally transformed/quantized residual to the inversequantization/inverse orthogonal transform unit 206.

When the prediction mode PredMode of the target coding block is themotion vector predictor mode in the inter prediction (MODE_INTER), theinter prediction unit 203 derives a plurality of motion vector predictorcandidates using coding information of the previously decoded picturesignal stored in the coding information storage memory 205 and registersthe plurality of derived motion vector predictor candidates in themotion vector predictor candidate list to be described below. The interprediction unit 203 selects a motion vector predictor according to themotion vector predictor index decoded and supplied by the bit stringsdecoding unit 201 from among the plurality of motion vector predictorcandidates registered in the motion vector predictor candidate list,calculates a motion vector from the motion vector difference decoded bythe bit strings decoding unit 201 and the selected motion vectorpredictor, and stores the calculated motion vector in the codinginformation storage memory 205 together with other coding information.The coding information of the coding block supplied/stored here is aprediction mode PredMode, flags predFlagL0[xP][yP] andpredFlagL1[xP][yP] indicating whether or not to use L0-prediction andL1-prediction, reference indices refIdxL0[xP][yP] and refIdxL1[xP][yP]of L0 and L1, motion vectors mvL0[xP][yP] and mvL1[xP][yP] of L0 and L1,and the like. Here, xP and yP are indices indicating a position of anupper left sample of the coding block within the picture. When theprediction mode PredMode is inter prediction (MODE_INTER) and the interprediction mode is L0-prediction (Pred_L0), the flag predFlagL0indicating whether or not to use L0-prediction is 1, and the flagpredFlagL1 indicating whether or not to use L1-prediction is 0. When theinter prediction mode is L1-prediction (Pred_L1), the flag predFlagL0indicating whether or not to use L0-prediction is 0, and the flagpredFlagL1 indicating whether or not to use L1-prediction is 1. When theinter prediction mode is bi-prediction (Pred_BI), both the flagpredFlagL0 indicating whether or not to use L0-prediction and the flagpredFlagL1 indicating whether or not to use L1-prediction are 1.Further, merging candidates are derived in the merge mode in which theprediction mode PredMode of the coding block of the target is interprediction (MODE_INTER). A plurality of merging candidates are derivedusing the coding information of the previously decoded coding blocksstored in the coding information storage memory 205 and are registeredin a merging candidate list to be described below, a merging candidatecorresponding to a merge index to be decoded and supplied by the bitstrings decoding unit 201 is selected from among the plurality ofmerging candidates registered in the merging candidate list, and interprediction information such as the flags predFlagL0[xP][yP] andpredFlagL1[xP][yP] indicating whether or not to use L0-prediction andL1-prediction of the selected merging candidate, the reference indicesrefIdxL0[xP][yP] and refIdxL1[xP][yP] of L0 and L1, and the motionvectors mvL0[xP][yP] and mvL1[xP][yP] of L0 and L1 is stored in thecoding information storage memory 205. Here, xP and yP are indicesindicating the position of the upper left sample of the coding block inthe picture. A detailed configuration and operation of the interprediction unit 203 will be described below.

The intra prediction unit 204 performs intra prediction when theprediction mode PredMode of the coding block of the target is intraprediction (MODE_INTRA). The coding information decoded by the bitstrings decoding unit 201 includes an intra prediction mode. The intraprediction unit 204 generates a predicted picture signal according tointra prediction from the decoded picture signal stored in the decodedpicture memory 208 in accordance with the intra prediction mode includedin the coding information decoded by the bit strings decoding unit 201and supplies the generated predicted picture signal to the decodingpicture signal superimposition unit 207. Because the intra predictionunit 204 corresponds to the intra prediction unit 103 of the picturecoding device 100, a process similar to that of the intra predictionunit 103 is performed.

The inverse quantization/inverse orthogonal transform unit 206 performsan inverse orthogonal transform and inverse quantization on theorthogonally transformed/quantized residual decoded by the bit stringsdecoding unit 201 and obtains the inversely orthogonallytransformed/inversely quantized residual.

The decoding picture signal superimposition unit 207 decodes a decodingpicture signal by superimposing a predicted picture signalinter-predicted by the inter prediction unit 203 or a predicted picturesignal intra-predicted by the intra prediction unit 204 and the residualinversely orthogonally transformed/inversely quantized by the inversequantization/inverse orthogonal transform unit 206 and stores thedecoded decoding picture signal in the decoded picture memory 208. Atthe time of storage in the decoded picture memory 208, the decodingpicture signal superimposition unit 207 may store a decoded picture inthe decoded picture memory 208 after a filtering process of reducingblock distortion or the like due to coding is performed on the decodedpicture.

Next, an operation of the block split unit 101 in the picture codingdevice 100 will be described. FIG. 3 is a flowchart showing an operationof dividing a picture into tree blocks and further dividing each treeblock. First, an input picture is divided into tree blocks having apredetermined size (step S1001). Each tree block is scanned in apredetermined order, i.e., raster scan order (step S1002), and theinside of the tree block of a target is divided (step S1003).

FIG. 7 is a flowchart showing a detailed operation of a split process ofstep S1003. First, it is determined whether or not a target block willbe divided into four parts (step S1101).

When it is determined that the target block will be divided into fourparts, the target block is divided into four parts (step S1102). Eachblock obtained by dividing the target block is scanned in a Z-scanorder, i.e., in the order of upper left, upper right, lower left, andlower right (step S1103). FIG. 5 shows an example of the Z-scan order,and reference numeral 601 of FIG. 6A shows an example in which thetarget block is divided into four parts. Numbers 0 to 3 of referencenumeral 601 of FIG. 6A indicate the order of processing. Then, the splitprocess of FIG. 7 is recursively executed for each block from thedivision in step S1101 (step S1104).

When it is determined that the target block will not be divided intofour parts, a binary-ternary split is performed (step S105).

FIG. 8 is a flowchart showing the detailed operation of a binary-ternarysplit process of step S1105. First, it is determined whether or not atarget block will be divided into two or three pans, i.e., whether ornot either a binary or ternary split will be performed (step S1201).

When it is not determined that the target block will be divided into twoor three parts, i.e., when it is determined that the target block willnot be divided, the split ends (step S1211). That is, a recursive splitprocess is not further performed on blocks divided according to therecursive split process.

When it is determined that the target block will be divided into two orthree parts, it is further determined whether or not the target blockwill be divided into two parts (step S1202).

When it is determined that the target block will be divided into twoparts, it is determined whether or not the target block will be dividedinto upper and lower parts (in a vertical direction)(step S1203). On thebasis of a determination result, the target block is divided into twoparts that are upper and lower parts (in the vertical direction) (stepS1204), or the target block is divided into two parts that are left andright parts (in a horizontal direction)(step S1205). As a result of stepS1204, the target block is divided into two parts that are upper andlower parts (in the vertical direction) as indicated by referencenumeral 602 in FIG. 68 . As a result of step S205, the target block isdivided into two parts that are left and right parts (in the horizontaldirection) as indicated by reference numeral 604 of FIG. 6D.

When it is not determined that the target block will be divided into twoparts, i.e., when it is determined that the target block will be dividedinto three parts, in step S1202, it is determined whether or not thetarget block will be divided into upper, middle, and lower parts (in thevertical direction)(step S1206). On the basis of a determination result,the target block is divided into three parts that are upper, middle, andlower parts (in the vertical direction) (step S1207), or the targetblock is divided into three parts that are left, middle, and right parts(in the horizontal direction)(step S208). As a result of step S1207, thetarget block is divided into three parts that are upper, middle, andlower parts (in the vertical direction) as indicated by referencenumeral 603 of FIG. 6C. As a result of step S1208, the target block isdivided into three parts that are left, middle, and right parts (in thehorizontal direction) as indicated by reference numeral 605 of FIG. 6E.

After any one of steps S1204, S1205, S1207, and S1208 is executed, eachof the blocks into which the target block is divided is scanned in orderfrom left to right and from top to bottom (step S1209). Numbers 0 to 2of reference numerals 602 to 605 of FIGS. 6B to 6E indicate the order ofprocessing. For each of the blocks into which the target block isdivided, a binary-ternary split process of FIG. 8 is recursivelyexecuted (step S1210).

The recursive block split described here may limit the necessity of asplit according to the number of splits or a size of the target block orthe like. Information that limits the necessity of a split may beimplemented by a configuration in which information is not delivered bymaking an agreement between the coding device and the decoding device inadvance or implemented by a configuration in which the coding devicedetermines information that limits the necessity of a split, records theinformation in a bit string, and delivers the information to thedecoding device.

When a certain block is divided, a block before the split is referred toas a parent block, and each block after the split is referred to as achild block.

Next, an operation of the block split unit 202 in the picture decodingdevice 200 will be described. The block split unit 202 divides the treeblock according to a processing procedure similar to that of the blocksplit unit 101 of the picture coding device 100. However, there is adifference in that the block split unit 101 of the picture coding device100 applies an optimization technique such as estimation of an optimumshape based on picture recognition or distortion rate optimization todetermine an optimum block split shape, whereas the block split unit 202of the picture decoding device 200 determines a block split shape bydecoding the block split information recorded in the bit string.

Syntax (a bit strings syntax rule) related to a block split according tothe first embodiment is shown in FIG. 9 . coding_quadtree( ) representssyntax related to a quad split process on the block. multi_type_tree( )represents syntax related to a binary or ternary split process on theblock. qt_split is a flag indicating whether or not the block is dividedinto four parts. qt_split=1 when the block is divided into four parts,and qt_split=(when the block is not divided into four pans. When theblock is divided into four parts (qt_split=1), a quad split process isrecursively performed on blocks, each of which has been divided intofour parts (coding_quadtree(0), coding_quadtree(1), coding_quadtree(2),coding_quadtree(3), and arguments 0 to 3 correspond to numbers indicatedby reference numeral 601 of FIG. 6A). When the block is not divided intofour parts (qt_split=0), the subsequent split is determined according tomulti_type_tree( ). mtt_split is a flag indicating whether or not asplit is further performed. When a split is further performed(mtt_split=1), mtt_split_vertical which is a flag indicating whether theblock is divided vertically or horizontally and mtt_split_binary whichis a flag for determining whether a binary or ternary split is performedare transmitted. mtt_split_vertical=1 indicates a split in the verticaldirection, and mtt_split_vertical=0 indicates a split in the horizontaldirection. mtt_split_binary=1 indicates a binary split, andmtt_split_binary=0 indicates a ternary split. In the binary split(mtt_split_binary=1), a split process is recursively performed onblocks, each of which is divided into two parts (multi_type_tree(0),multi_type_tree(1), and arguments 0 to 1 correspond to numbers indicatedby reference numeral 602 or 604 in FIGS. 6B to 6D). In the case of theternary split (mtt_split_binary=0), a split process is recursivelyperformed on blocks, each of which is divided into three parts(multi_type_tree(0), multi_type_tree(1), multi_type_tree(2), andarguments 0 to 2 correspond to numbers indicated by reference numeral603 of FIG. 6B or numbers indicated by reference numeral 605 of FIG.6E). Until mtt_split=0 is reached, a hierarchical block split isperformed by recursively calling multi_type_tree.

<Inter Prediction>

An inter prediction method according to the embodiment is performed inthe inter prediction unit 102 of the picture coding device of FIG. 1 andthe inter prediction unit 203 of the picture decoding device of FIG. 2 .

The inter prediction method according to the embodiment will bedescribed with reference to the drawings. The inter prediction method isperformed in both coding and decoding processes in units of codingblocks.

<Description of Inter Prediction Unit 102 of Coding Side>

FIG. 16 is a diagram showing a detailed configuration of the interprediction unit 102 of the picture coding device in FIG. 1 . The normalmotion vector predictor mode derivation unit 301 derives a plurality ofnormal motion vector predictor candidates to select a motion vectorpredictor, and calculates a motion vector difference between theselected motion vector predictor and a detected motion vector. Adetected inter prediction mode, reference index, and motion vector andthe calculated motion vector difference become inter predictioninformation of the normal motion vector predictor mode. This interprediction information is supplied to the inter prediction modedetermination unit 305. A detailed configuration and a process of thenormal motion vector predictor mode derivation unit 301 will bedescribed below.

The normal merge mode derivation unit 302 derives a plurality of normalmerging candidates to select a normal merging candidate and obtainsinter prediction information of the normal merge mode. This interprediction information is supplied to the inter prediction modedetermination unit 305. A detailed configuration and a process of thenormal merge mode derivation unit 302 will be described below.

A subblock-based motion vector predictor mode derivation unit 303derives a plurality of subblock-based motion vector predictor candidatesto select a subblock-based motion vector predictor and calculates amotion vector difference between the selected subblock-based motionvector predictor and the detected motion vector. A detected interprediction mode, reference index, and motion vector and the calculatedmotion vector difference become the inter prediction information of thesubblock-based motion vector predictor mode. This inter predictioninformation is supplied to the inter prediction mode determination unit305.

The subblock-based merge mode derivation unit 304 derives a plurality ofsubblock-based merging candidates to select a subblock-based mergingcandidate, and obtains inter prediction information of thesubblock-based merge mode. This inter prediction information is suppliedto the inter prediction mode determination unit 305.

The inter prediction mode determination unit 305 determines interprediction information on the basis of the inter prediction informationsupplied from the normal motion vector predictor mode derivation unit301, the normal merge mode derivation unit 302, the subblock-basedmotion vector predictor mode derivation unit 303, and the subblock-basedmerge mode derivation unit 304. Inter prediction information accordingto the determination result is supplied from the inter prediction modedetermination unit 305 to the motion-compensated prediction unit 306.

The motion-compensated prediction unit 306 performs inter prediction onthe reference picture signal stored in the decoded picture memory 104 onthe basis of the determined inter prediction information. A detailedconfiguration and a process of the motion-compensated prediction unit306 will be described below.

<Description of Inter Prediction Unit 203 of Decoding Side>

FIG. 22 is a diagram showing a detailed configuration of the interprediction unit 203 of the picture decoding device of FIG. 2 .

A normal motion vector predictor mode derivation unit 401 derives aplurality of normal motion vector predictor candidates to select amotion vector predictor, calculates a sum of the selected motion vectorpredictor and the decoded motion vector difference, and sets thecalculated sum as a motion vector. A decoded inter prediction mode,reference index, and motion vector become inter prediction informationof the normal motion vector predictor mode. This inter predictioninformation is supplied to a motion-compensated prediction unit 406 viathe switch 408. A detailed configuration and a process of the normalmotion vector predictor mode derivation unit 401 will be describedbelow.

A normal merge mode derivation unit 402 derives a plurality of normalmerging candidates to select a normal merging candidate and obtainsinter prediction information of the normal merge mode. This interprediction information is supplied to the motion-compensated predictionunit 406 via the switch 408. A detailed configuration and a process ofthe normal merge mode derivation unit 402 will be described below.

A subblock-based motion vector predictor mode derivation unit 403derives a plurality of subblock-based motion vector predictor candidatesto select a subblock-based motion vector predictor, calculates a sum ofthe selected subblock-based motion vector predictor and the decodedmotion vector difference, and sets the calculated sum as a motionvector. A decoded inter prediction mode, reference index, and motionvector become the inter prediction information of the subblock-basedmotion vector predictor mode. This inter prediction information issupplied to the motion-compensated prediction unit 406 via the switch408.

A subblock-based merge mode derivation unit 404 derives a plurality ofsubblock-based merging candidates to select a subblock-based mergingcandidate and obtains inter prediction information of the subblock-basedmerge mode. This inter prediction information is supplied to themotion-compensated prediction unit 406 via the switch 408.

The motion-compensated prediction unit 406 performs inter prediction onthe reference picture signal stored in the decoded picture memory 208 onthe basis of the determined inter prediction information. A detailedconfiguration and a process of the motion-compensated prediction unit406 are similar to those of the motion-compensated prediction unit 306of the coding side.

<Normal Motion Vector Predictor Mode Derivation Unit (Normal AMVP)>

The normal motion vector predictor mode derivation unit 301 of FIG. 17includes a spatial motion vector predictor candidate derivation unit321, a temporal motion vector predictor candidate derivation unit 322, ahistory-based motion vector predictor candidate derivation unit 323, amotion vector predictor candidate replenishment unit 325, a normalmotion vector detection unit 326, a motion vector predictor candidateselection unit 327, and a motion vector subtraction unit 328.

The normal motion vector predictor mode derivation unit 401 of FIG. 23includes a spatial motion vector predictor candidate derivation unit421, a temporal motion vector predictor candidate derivation unit 422, ahistory-based motion vector predictor candidate derivation unit 423, amotion vector predictor candidate replenishment unit 425, a motionvector predictor candidate selection unit 426, and a motion vectoraddition unit 427.

Processing procedures of the normal motion vector predictor modederivation unit 301 of the coding side and the normal motion vectorpredictor mode derivation unit 401 of the decoding side will bedescribed using the flowcharts of FIGS. 19 and 25 , respectively. FIG.19 is a flowchart showing a normal motion vector predictor modederivation processing procedure of the normal motion vector predictormode derivation unit 301 of the coding side, and FIG. 25 is a flowchartshowing a normal motion vector predictor mode derivation processingprocedure of the normal motion vector predictor mode derivation unit 401of the decoding side.

<Normal Motion Vector Predictor Mode Derivation Unit (Normal AMVP):Description of Coding Side>

The normal motion vector predictor mode derivation processing procedureof the coding side will be described with reference to FIG. 19 . In thedescription of the processing procedure of FIG. 19 , the term “normal”shown in FIG. 19 may be omitted.

First, the normal motion vector detection unit 326 detects a normalmotion vector for each inter prediction mode and each reference index(step S100 of FIG. 19 ). Subsequently, in the spatial motion vectorpredictor candidate derivation unit 321, the temporal motion vectorpredictor candidate derivation unit 322, the history-based motion vectorpredictor candidate derivation unit 323, the motion vector predictorcandidate replenishment unit 325, the motion vector predictor candidateselection unit 327, and the motion vector subtraction unit 328, a motionvector difference of a motion vector used for inter prediction of thenormal motion vector predictor mode is calculated for each of L0 and L1(steps S101 to S106 of FIG. 19 ). Specifically, when the prediction modePredMode of the target block is inter prediction (MODE_INTER) and theinter prediction mode is L0-prediction (Pred_L0), the motion vectorpredictor candidate list mvpListL0 of L0 is calculated to select themotion vector predictor mvpL0, and the motion vector difference mvdL0 ofthe motion vector mvL0 of L0 is calculated. When the inter predictionmode of the target block is L1-prediction (Pred_L1), the motion vectorpredictor candidate list mvpListL1 of L1 is calculated to select themotion vector predictor mvpL1, and the motion vector difference mvdL1 ofthe motion vector mvL1 of L1 is calculated. When the inter predictionmode of the target block is bi-prediction (Pred_BI), both L0-predictionand L1-prediction are performed, the motion vector predictor candidatelist mvpListL0 of L0 is calculated to select a motion vector predictormvpL0 of L0, the motion vector difference mvdL0 of a motion vector mvL0of L0 is calculated, the motion vector predictor candidate listmvpListL1 of L1 is calculated to select a motion vector predictor mvpL1of L1, and a motion vector difference mvdL1 of a motion vector mvL1 ofL1 is calculated.

Although a motion vector difference calculation process is performed foreach of L0 and L1, the motion vector difference calculation processbecomes a process common to both L0 and L1. Therefore, in the followingdescription, L0 and L1 are represented as common LX. X of LX is 0 in theprocess of calculating the motion vector difference of L0, and X of LXis 1 in the process of calculating the motion vector difference of L1.Also, when information of another list instead of LX is referred toduring the process of calculating the motion vector difference of LX,the other list is represented as LY.

When the motion vector mvLX of LX is used (step S102 of FIG. 19 : YES),the motion vector predictor candidates of LX are calculated to constructthe motion vector predictor candidate list mvpListLX of LX (step S103 ofFIG. 19 ). In the spatial motion vector predictor candidate derivationunit 321, the temporal motion vector predictor candidate derivation unit322, the history-based motion vector predictor candidate derivation unit323, and the motion vector predictor candidate replenishment unit 325 ofthe normal motion vector predictor mode derivation unit 301, a pluralityof motion vector predictor candidates are derived to construct themotion vector predictor candidate list mvpListLX. The detailedprocessing procedure of step S103 of FIG. 19 will be described belowusing the flowchart of FIG. 20 .

Subsequently, the motion vector predictor candidate selection unit 327selects a motion vector predictor mvpLX of LX from the motion vectorpredictor candidate list mvpListLX of LX (step S104 of FIG. 19 ). Here,one element (an i^(th) element when counted from a 0^(th) element) inthe motion vector predictor candidate list mvpListLX is represented asmvpListLX[i]. Each motion vector difference that is a difference betweenthe motion vector mvLX and each motion vector predictor candidatemvpListLX[i] stored in the motion vector predictor candidate listmvpListLX is calculated. A code amount when the motion vectordifferences are coded is calculated for each element (motion vectorpredictor candidate) of the motion vector predictor candidate listmvpListLX. Then, a motion vector predictor candidate mvpListLX[i] thatminimizes the code amount for each motion vector predictor candidateamong the elements registered in the motion vector predictor candidatelist mvpListLX is selected as the motion vector predictor mvpLX and itsindex i is acquired. When there are a plurality of motion vectorpredictor candidates having the smallest generated code amount in themotion vector predictor candidate list mvpListLX, a motion vectorpredictor candidate mvpListLX[i] represented by a smaller number in theindex i in the motion vector predictor candidate list mvpListLX isselected as an optimum motion vector predictor mvpLX and its index i isacquired.

Subsequently, the motion vector subtraction unit 328 subtracts theselected motion vector predictor mvpLX of LX from the motion vector mvLXof LX and calculates a motion vector difference mvdLX of LX asmvdLX=mvLX−mvpLX (step S105 of FIG. 19 ).

<Normal Motion Vector Predictor Mode Derivation Unit (Normal AMVP):Description of Decoding Side>

Next, the normal motion vector predictor mode processing procedure ofthe decoding side will be described with reference to FIG. 25 . On thedecoding side, in the spatial motion vector predictor candidatederivation unit 421, the temporal motion vector predictor candidatederivation unit 422, the history-based motion vector predictor candidatederivation unit 423, and the motion vector predictor candidatereplenishment unit 425, a motion vector for use in inter prediction ofthe normal motion vector predictor mode is calculated for each of L0 andL1 (steps S201 to S206 of FIG. 25 ). Specifically, when the predictionmode PredMode of the target block is inter prediction (MODE_INTER) andthe inter prediction mode of the target block is L0-prediction(Pred_L0), the motion vector predictor candidate list mvpListL0 of L0 iscalculated to select the motion vector predictor mvpL0, and a motionvector mvL0 of L0 is calculated. When the inter prediction mode of thetarget block is L1-prediction (Pred_L1), the motion vector predictorcandidate list mvpListL1 of L1 is calculated to select the motion vectorpredictor mvpL1, and the motion vector mvL1 of L1 is calculated. Whenthe inter prediction mode of the target block is bi-prediction(Pred_BI), both L0-prediction and L1-prediction are performed, themotion vector predictor candidate list mvpListL0 of L0 is calculated toselect a motion vector predictor mvpL0 of L0, a motion vector mvL0 of L0is calculated, the motion vector predictor candidate list mvpListL1 ofL1 is calculated to select a motion vector predictor mvpL1 of L1, andeach motion vector mvL1 of L1 is calculated.

Although a motion vector calculation process is performed for each of L0and L1 on the decoding side as on the coding side, the motion vectorcalculation process becomes a process common to both L0 and L1.Therefore, in the following description, L0 and L1 are represented ascommon LX. LX represents an inter prediction mode for use in the interprediction of a target coding block. X is 0 in the process ofcalculating the motion vector of L0, and X is 1 in the process ofcalculating the motion vector of L1. Also, when information of anotherreference list instead of a reference list identical to that of LX of acalculation target is referred to during the process of calculating themotion vector of LX, the other reference list is represented as LY.

When the motion vector mvLX of LX is used (step S202 of FIG. 25 : YES)the motion vector predictor candidates of LX are calculated to constructthe motion vector predictor candidate list mvpListLX of LX (step S203 ofFIG. 25 ). In the spatial motion vector predictor candidate derivationunit 421, the temporal motion vector predictor candidate derivation unit422, the history-based motion vector predictor candidate derivation unit423, and the motion vector predictor candidate replenishment unit 425 ofthe normal motion vector predictor mode derivation unit 401, a pluralityof motion vector predictor candidates are calculated to construct amotion vector predictor candidate list mvpListLX. A detailed processingprocedure of step S203 of FIG. 25 will be described below using theflowchart of FIG. 20 .

Subsequently, the motion vector predictor candidate mvpListLX[mvpIdxLX]corresponding to the index mvpIdxLX of the motion vector predictordecoded and supplied by the bit strings decoding unit 201 from themotion vector predictor candidate list mvpListLX is extracted as aselected motion vector predictor mvpLX in the motion vector predictorcandidate selection unit 426 (step S204 of FIG. 25 ).

Subsequently, the motion vector addition unit 427 sums the motion vectordifference mvdLX of LX that is decoded and supplied by the bit stringsdecoding unit 201 and the motion vector predictor mvpLX of LX andcalculates the motion vector mvLX of LX as mvLX=mvpLX+mvdLX (step S205of FIG. 25 ).

<Normal Motion Vector Predictor Mode Derivation Unit (Normal AMVP):Motion Vector Prediction Method>

FIG. 20 is a flowchart showing a processing procedure of a normal motionvector predictor mode derivation process having a function common to thenormal motion vector predictor mode derivation unit 301 of the picturecoding device and the normal motion vector predictor mode derivationunit 401 of the picture decoding device according to the embodiment ofthe present invention.

The normal motion vector predictor mode derivation unit 301 and thenormal motion vector predictor mode derivation unit 401 include a motionvector predictor candidate list mvpListLX. The motion vector predictorcandidate list mvpListLX has a list structure and is provided with astorage area where a motion vector predictor index indicating thelocation inside the motion vector predictor candidate list and a motionvector predictor candidate corresponding to the index are stored aselements. The number of the motion vector predictor index starts from 0,and motion vector predictor candidates are stored in the storage area ofthe motion vector predictor candidate list mvpListLX. In the presentembodiment, it is assumed that at least two motion vector predictorcandidates (inter prediction information) can be registered in themotion vector predictor candidate list mvpListLX. Furthermore, avariable numCurrMvpCand indicating the number of motion vector predictorcandidates registered in the motion vector predictor candidate listmvpListLX is set to 0.

The spatial motion vector predictor candidate derivation units 321 and421 derive motion vector predictor candidates from neighboring blocks onthe left side. In this process, a motion vector predictor mvLXA isderived with reference to the inter prediction information of theneighboring block on the left side (A0 or A1 of FIG. 11 ), i.e., a flagindicating whether or not a motion vector predictor candidate can beused, a motion vector, a reference index, and the like, and the derivedmvLXA is added to the motion vector predictor candidate list mvpListLX(step S301 of FIG. 20 ). Also, X is 0 at the time of L0-prediction, andX is 1 at the time of L1-prediction (the same is true hereinafter).Subsequently, the spatial motion vector predictor candidate derivationunits 321 and 421 derive a motion vector predictor candidate from aneighboring block on the upper side. In this process, the motion vectorpredictor mvLXB is derived with reference to inter predictioninformation of a neighboring block on the upper side (B0, B1, or B2 ofFIG. 11 ). i.e., a flag indicating whether or not a motion vectorpredictor candidate can be used, a motion vector, a reference index, andthe like, and mvLXB is added to the motion vector predictor candidatelist mvpListLX if the derived mvLXA is not equal to the derived mvLXB(step S302 of FIG. 20 ). The processing of steps S301 and S302 of FIG.20 is common except that positions of neighboring blocks to be referredto and the number of neighboring blocks to be referred to are different,and a flag availableFlagLXN indicating whether or not a motion vectorpredictor candidate of the coding block can be used, a motion vectormvLXN, and a reference index refIdxN (N represents A or B and the sameis true hereinafter) are derived.

Subsequently, the temporal motion vector predictor candidate derivationunits 322 and 422 derive motion vector predictor candidates from blocksin a picture whose time is different from that of the current targetpicture. In this process, a flag availableFlagLXCol indicating whetheror not a motion vector predictor candidate of a coding block of apicture of a different time can be used, a motion vector mvLXCol, areference index refIdxCol, and a reference list listCol are derived, andmvLXCol is added to the motion vector predictor candidate list mvpListLX(step S303 of FIG. 20 ).

Also, it is assumed that the processes of the temporal motion vectorpredictor candidate derivation units 322 and 422 can be omitted in unitsof sequences (SPS), pictures (PPS), or slices.

Subsequently, the history-based motion vector predictor candidatederivation units 323 and 423 add the history-based motion vectorpredictor candidates registered in the history-based motion vectorpredictor candidate list HmvpCandList to the motion vector predictorcandidate list mvpListLX (step S304 of FIG. 20 ). Details of theregistration processing procedure of step S304 will be described belowusing the flowchart of FIG. 29 .

Subsequently, the motion vector predictor candidate replenishment units325 and 425 add motion vector predictor candidates having apredetermined value such as (0, 0) until the motion vector predictorcandidate list mvpListLX is satisfied (S305 of FIG. 20 ).

<Normal Merge Mode Derivation Unit (Normal Merge)>

The normal merge mode derivation unit 302 of FIG. 18 includes a spatialmerging candidate derivation unit 341, a temporal merging candidatederivation unit 342, an average merging candidate derivation unit 344, ahistory-based merging candidate derivation unit 345, a merging candidatereplenishment unit 346, and a merging candidate selection unit 347.

The normal merge mode derivation unit 402 of FIG. 24 includes a spatialmerging candidate derivation unit 441, a temporal merging candidatederivation unit 442, an average merging candidate derivation unit 444, ahistory-based merging candidate derivation unit 445, a merging candidatereplenishment unit 446, and a merging candidate selection unit 447.

FIG. 21 is an explanatory flowchart showing a procedure of a normalmerge mode derivation process having a function common to the normalmerge mode derivation unit 302 of the picture coding device and thenormal merge mode derivation unit 402 of the picture decoding deviceaccording to the embodiment of the present invention.

Hereafter, various processes will be described step by step. Although acase in which a type of slice slice_type is a B slice will be describedunless otherwise specified in the following description, the presentinvention can also be applied to the case of a P slice. However, whenthe type of slice slice_type is a P slice, because only theL0-prediction (Pred_L0) is provided as the inter prediction mode andL1-prediction (Pred_L1) and bi-prediction (Pred_BI) are absent, aprocess related to L1 can be omitted.

The normal merge mode derivation unit 302 and the normal merge modederivation unit 402 have a merging candidate list mergeCandList. Themerging candidate list mergeCandList has a list structure and isprovided with a merge index indicating the location within the mergingcandidate list and a storage area where merging candidates correspondingto the index are stored as elements. The number of the merge indexstarts from 0, and merging candidates are stored in the storage area ofthe merging candidate list mergeCandList. In the subsequent process, themerging candidate of the merge index i registered in the mergingcandidate list mergeCandList is represented by mergeCandList[i]. In thepresent embodiment, it is assumed that at least six merging candidates(inter prediction information) can be registered in the mergingcandidate list mergeCandList. Further, a variable numCurrMergeCandindicating the number of merging candidates registered in the mergingcandidate list mergeCandList is set to 0.

A spatial merging candidate derivation unit 341 and a spatial mergingcandidate derivation unit 441 derive spatial merging candidates fromblocks (B1, A1, B0, A0, and B2 of FIG. 11 ) adjacent to a left side andan upper side of a target block in the order of B1, A1, B0, A0, and B2from the coding information stored in the coding information storagememory 111 of the picture coding device or the coding informationstorage memory 205 of the picture decoding device, and register thederived spatial merging candidates in the merging candidate listmergeCandList (step S401 of FIG. 21 ). Here, N indicating any one ofspatial merging candidates B1, A1, B0, A0, and B2 and a temporal mergingcandidate Col is defined. A flag availableFlagN indicating whether ornot inter prediction information of block N is available as a spatialmerging candidate, a reference index refIdxL0N of L0 and a referenceindex refIdxL1N of L1 of spatial merging candidate N, an U-predictionflag predFlagL0N indicating whether or not L0-prediction is to beperformed, an L1-prediction flag predFlagL1N indicating whether or notL1-prediction is to be performed, a motion vector mvL0N of L0, and amotion vector mvL1N of L1 are derived. However, in the presentembodiment, because the merging candidate is derived without referringto inter prediction information of a block included in a coding blockserving as a target, a spatial merging candidate using the interprediction information of the block included in the target coding blockis not derived.

Subsequently, the temporal merging candidate derivation unit 342 and thetemporal merging candidate derivation unit 442 derive temporal mergingcandidates from pictures of different times and register the derivedtemporal merging candidates in the merging candidate list mergeCandList(step S402 of FIG. 21 ). A lag availableFlagCol indicating whether ornot the temporal merging candidate can be used, an L0-prediction flagpredFlagL0Col indicating whether or not L0-prediction of the temporalmerging candidate is performed, an L1-prediction flag predFlagL1Colindicating whether or not L1-prediction is performed, a motion vectormvL0Col of L0, and a motion vector mvL1Col of L1 are derived.

Also, it is assumed that the processes of the temporal merging candidatederivation unit 342 and the temporal merging candidate derivation unit442 can be omitted in units of sequences (SPS), pictures (PPS), orslices.

Subsequently, the history-based merging candidate derivation unit 345and the history-based merging candidate derivation unit 445 registerhistory-based motion vector predictor candidates registered in thehistory-based motion vector predictor candidate list HmvpCandList in themerging candidate list mergeCandList (step S403 of FIG. 21 ).

Also, when the number of merging candidates numCurrMergeCand registeredwithin the merging candidate list mergeCandList is smaller than themaximum number of merging candidates MaxNumMergeCand, the maximum numberof merging candidates MaxNumMergeCand is set as an upper limit of thenumber of merging candidates numCurrMergeCand registered within themerging candidate list mergeCandList. and history-based mergingcandidates are derived and registered in the merging candidate listmergeCandList.

Subsequently, the average merging candidate derivation unit 344 and theaverage merging candidate derivation unit 444 derive an average mergingcandidate from the merging candidate list mergeCandList and add thederived average merging candidate to the merging candidate listmergeCandList (step S404 of FIG. 21 ).

Also, when the number of merging candidates numCurrMergeCand registeredwithin the merging candidate list mergeCandList is smaller than themaximum number of merging candidates MaxNumMergeCand, the maximum numberof merging candidates MaxNumMergeCand is set as an upper limit of thenumber of merging candidates numCurrMergeCand registered within themerging candidate list mergeCandList, and average merging candidates arederived and registered in the merging candidate list mergeCandList.

Here, the average merging candidate is a new merging candidate having amotion vector obtained by averaging motion vectors of a first mergingcandidate and a second merging candidate registered in the mergingcandidate list mergeCandList for each of the L0-prediction and theL1-prediction.

Subsequently, in the merging candidate replenishment unit 346 and themerging candidate replenishment unit 446, when the number of mergingcandidates numCurrMergeCand registered within the merging candidate listmergeCandList is smaller than the maximum number of merging candidatesMaxNumMergeCand, the maximum number of merging candidatesMaxNumMergeCand is set as an upper limit of the number of mergingcandidates numCurrMergeCand registered within the merging candidate listmergeCandList. and an additional merging candidate is derived andregistered in the merging candidate list mergeCandList (step S405 ofFIG. 21 ). In the P slice, a merging candidate for which a motion vectorhas a value of (0, 0) and the prediction mode is L0-prediction (Pred_L0)is added using the maximum number of merging candidates MaxNumMergeCandas the upper limit. In the B slice, a merging candidate for which amotion vector has a value of (0, 0) and the prediction mode isbi-prediction (Pred_BI) is added. A reference index when the mergingcandidate is added is different from the previously added referenceindex.

Subsequently, the merging candidate selection unit 347 and the mergingcandidate selection unit 447 select merging candidates from the mergingcandidates registered within the merging candidate list mergeCandList.The merging candidate selection unit 347 of the coding side selects amerging candidate by calculating a code amount and a distortion amount,and supplies a merge index indicating the selected merging candidate andinter prediction information of the merging candidate to themotion-compensated prediction unit 306 via the inter prediction modedetermination unit 305. On the other hand, the merging candidateselection unit 447 of the decoding side selects a merging candidate onthe basis of a decoded merge index and supplies the selected mergingcandidate to the motion-compensated prediction unit 406.

<Update of History-Based Motion Vector Predictor Candidate List>

Next, an initialization method and an update method of the history-basedmotion vector predictor candidate list HmvpCandList provided in thecoding information storage memory 111 of the coding side and the codinginformation storage memory 205 of the decoding side will be described indetail. FIG. 26 is an explanatory flowchart showing a processingprocedure of initializing/updating a history-based motion vectorpredictor candidate list.

In the present embodiment, it is assumed that the history-based motionvector predictor candidate list HmvpCandList is updated in the codinginformation storage memory 111 and the coding information storage memory205. A history-based motion vector predictor candidate list update unitmay be installed in the inter prediction unit 102 and the interprediction unit 203 to update the history-based motion vector predictorcandidate list HmvpCandList.

The history-based motion vector predictor candidate list HmvpCandList isinitially set at the beginning of the slice, the history-based motionvector predictor candidate list HmvpCandList is updated when the normalmotion vector predictor mode or the normal merge mode has been selectedby the prediction method determination unit 105 on the coding side, andthe history-based motion vector predictor candidate list HmvpCandList isupdated when the prediction information decoded by the bit stringsdecoding unit 201 is about the normal motion vector predictor mode orthe normal merge mode on the decoding side.

The inter prediction information used when inter prediction is performedin the normal motion vector predictor mode or the normal merge mode isregistered as an inter prediction information candidate hMvpCand in thehistory-based motion vector predictor candidate list HmvpCandList. Theinter prediction information candidate hMvpCand includes a referenceindex refIdxL0 of L0, a reference index refIdxL1 of L1, an L0-predictionflag predFlagL0 indicating whether or not L0-prediction is performed, anL1-prediction flag predFlagL1 indicating whether or not L1-prediction isperformed, a motion vector mvL0 of L0, and a motion vector mvL1 of L1.

When there is inter prediction information having the same value as aninter prediction information candidate hMvpCand among elements (i.e.,inter prediction information) registered in the history-based motionvector predictor candidate list HmvpCandList provided in the codinginformation storage memory 111 of the coding side and the codinginformation storage memory 205 of the decoding side, the element isremoved from the history-based motion vector predictor candidate listHmvpCandList. On the other hand, when there is no inter predictioninformation having the same value as an inter prediction informationcandidate hMvpCand, the element at the beginning of the history-basedmotion vector predictor candidate list HmvpCandList is removed, and theinter prediction information candidate hMvpCand is added to the end ofthe history-based motion vector predictor candidate list HmvpCandList.

The number of elements of the history-based motion vector predictorcandidate list HmvpCandList provided in the coding information storagememory 111 of the coding side and the coding information storage memory205 of the decoding side according to the present invention is assumedto be six.

First, the history-based motion vector predictor candidate listHmvpCandList is initialized in units of slices (step S2101 of FIG. 26 ).All elements of the history-based motion vector predictor candidate listHmvpCandList are empty at the beginning of the slice, and a value of thenumber of history-based motion vector predictor candidates (the currentnumber of candidates) NumHmvpCand registered in the history-based motionvector predictor candidate list HmvpCandList is set to 0.

Also, the initialization of the history-based motion vector predictorcandidate list HmvpCandList is performed in units of slices (a firstcoding block of a slice), but may be performed in units of pictures,tiles, or tree block rows.

Subsequently, the following process of updating the history-based motionvector predictor candidate list HmvpCandList is iteratively performedfor each coding block within the slice (steps S2102 to S2107 of FIG. 26).

First, initial setting is performed for each coding block. A flagidenticalCandExist indicating whether or not there is an identicalcandidate is set to a value of FALSE, and a removal target indexremoveIdx indicating a removal target candidate is set to 0 (step S2103of FIG. 26 ).

It is determined whether or not there is an inter prediction informationcandidate hMvpCand of the registration target (step S2104 of FIG. 26 ).When the prediction method determination unit 105 of the coding sidedetermines that the mode is the normal motion vector predictor mode orthe normal merge mode or when the bit strings decoding unit 201 of thedecoding side decodes the mode as the normal motion vector predictormode or the normal merge mode, its inter prediction information is setas an inter prediction information candidate hMvpCand of theregistration target. When the prediction method determination unit 105of the coding side determines that the mode is the intra-predictionmode, the subblock-based motion vector predictor mode, or thesubblock-based merge mode or when the bit strings decoding unit 201 ofthe decoding side decodes the mode as the intra-prediction mode, thesubblock-based motion vector predictor mode, or the subblock-based mergemode, a process of updating the history-based motion vector predictorcandidate list HmvpCandList is not performed, and the inter predictioninformation candidate hMvpCand of the registration target does notexist. When there is no inter prediction information candidate hMvpCandof the registration target, steps S2105 to S2106 are skipped (step S2104of FIG. 26 : NO). When there is an inter prediction informationcandidate hMvpCand of the registration target, the processing from stepS2105 is performed (step S2104 of FIG. 26 : YES).

Subsequently, it is determined whether or not there is an element (interprediction information) having the same value as the inter predictioninformation candidate hMvpCand of the registration target, i.e., anidentical element, among elements of the history-based motion vectorpredictor candidate list HmvpCandList (step S2105 of FIG. 26 ). FIG. 27is a flowchart of an identical element checking processing procedure.When a value of the number of history-based motion vector predictorcandidates NumHmvpCand is 0 (step S2121 of FIG. 27 : NO), thehistory-based motion vector predictor candidate list HmvpCandList isempty and there is no identical candidate, so steps S2122 to S2125 ofFIG. 27 are skipped and the present identical element checkingprocessing procedure is completed. When the value of the number ofhistory-based motion vector predictor candidates NumHmvpCand is greaterthan 0 (YES in step S2121 of FIG. 27 ), the processing of step S2123 isiterated until the history-based motion vector predictor index hMvpIdxchanges from 0 to NumHmvpCand−1 (steps S2122 to S2125 of FIG. 27 ).First, a comparison is made regarding whether or not an hMvpIdx^(th)element HmvpCandList[hMvpIdx] when counted from a 0^(th) element of thehistory-based motion vector predictor candidate list is identical to theinter prediction information candidate hMvpCand (step S2123 of FIG. 27). When they are the same (step S2123 of FIG. 27 : YES), a flagidenticalCandExist indicating whether or not there is an identicalcandidate is set to a value of TRUE and a removal target index removeIdxindicating a position of an element of a removal target is set to acurrent value of the history-based motion vector predictor indexhMvpIdx, and the present identical element checking process ends. Whenthey are not the same (step S2123 of FIG. 27 : NO), hMvpIdx isincremented by 1. If the history-based motion vector predictor indexhMvpIdx is less than or equal to NumHmvpCand−1, the processing from stepS2123 is performed.

Referring to the flowchart of FIG. 26 again, a process of shifting andadding an element of the history-based motion vector predictor candidatelist HmvpCandList is performed (step S2106 of FIG. 26 ). FIG. 28 is aflowchart of a processing procedure of shifting/adding an element of thehistory-based motion vector predictor candidate list HmvpCandList ofstep S2106 of FIG. 26 . First, it is determined whether or not to add anew element after removing an element stored in the history-based motionvector predictor candidate list HmvpCandList or to add a new elementwithout removing the element. Specifically, a comparison is maderegarding whether or not the flag identicalCandExist indicating whetheror not an identical candidate exists is TRUE or NumHmvpCand is six (stepS2141 of FIG. 28 ). When either the condition that the flagidenticalCandExist indicating whether or not an identical candidateexists is TRUE or the condition that the current number of candidatesNumHmvpCand is six is satisfied (step S2141 of FIG. 28 : YES), a newelement is added after removing the element stored in the history-basedmotion vector predictor candidate list HmvpCandList. The initial valueof index i is set to a value of removeIdx+1. The element shift processof step S2143 is iterated from this initial value to NumHmvpCand (stepsS2142 to S2144 of FIG. 28 ). By copying the element of HmvpCandList[i]to HmvpCandList[i−1], the element is shifted forward (step S2143 of FIG.28 ) and i is incremented by 1 (steps S2142 to S2144 of FIG. 28 ).Subsequently, the inter prediction information candidate hMvpCand isadded to a (NumHmvpCand−1)^(th) element HmvpCandList[NumHmvpCand−1] whencounted from a & element that corresponds to the end of thehistory-based motion vector predictor candidate list (step S2145 of FIG.28 ), and the present process of shifting/adding an element of thehistory-based motion vector predictor candidate list HmvpCandList ends.On the other hand, when neither the condition that the flagidenticalCandExist indicating whether or not an identical candidateexists is TRUE nor the condition that the current number of candidatesNumHmvpCand is six is satisfied (step S2141 of FIG. 28 : NO), the interprediction information candidate hMvpCand is added to the end of thehistory-based motion vector predictor candidate list without removing anelement stored in the history-based motion vector predictor candidatelist HmvpCandList (step S2146 of FIG. 28 ). Here, the end of thehistory-based motion vector predictor candidate list is aNumHmvpCand^(th) element HmvpCandList[NumHmvpCand] when counted from a0^(th) element. Also, NumHmvpCand is incremented by 1, and the presentprocess of shifting/adding an element of the history-based motion vectorpredictor candidate list HmvpCandList ends.

FIG. 31 is an explanatory diagram showing an example of a process ofupdating the history-based motion vector predictor candidate list. Whena new element is added to the history-based motion vector predictorcandidate list HmvpCandList in which six elements (inter predictioninformation) have been registered, the elements are compared with thenew inter prediction information in order from a front element of thehistory-based motion vector predictor candidate list HmvpCandList (FIG.31A). If the new element has the same value as a third element HMVP2from the beginning of the history-based motion vector predictorcandidate list HmvpCandList, the element HMVP2 is removed from thehistory-based motion vector predictor candidate list HmvpCandList andsubsequent elements HMVP3 to HMVP5 are shifted forward (copied) one byone, and the new element is added to the end of the history-based motionvector predictor candidate list HmvpCandList (FIG. 318 ) to complete theupdate of the history-based motion vector predictor candidate listHmvpCandList (FIG. 31C).

<History-Based Motion Vector Predictor Candidate Derivation Process>

Next, a method of deriving a history-based motion vector predictorcandidate from the history-based motion vector predictor candidate listHmvpCandList, which is a processing procedure of step S304 of FIG. 20that is a process common to the history-based motion vector predictorcandidate derivation unit 323 of the normal motion vector predictor modederivation unit 301 of the coding side and the history-based motionvector predictor candidate derivation unit 423 of the normal motionvector predictor mode derivation unit 401 of the decoding side, will bedescribed in detail. FIG. 29 is an explanatory flowchart showing ahistory-based motion vector predictor candidate derivation processingprocedure.

When the current number of motion vector predictor candidatesnumCurrMvpCand is greater than or equal to the maximum number ofelements in the motion vector predictor candidate list mvpListLX (here,2) or a value of the number of history-based motion vector predictorcandidates NumHmvpCand is 0 (NO in step S2201 of FIG. 29 ), theprocessing of steps S2202 to S2209 of FIG. 29 is omitted, and thehistory-based motion vector predictor candidate derivation processingprocedure ends. When the current number of motion vector predictorcandidates numCurrMvpCand is smaller than 2, which is the maximum numberof elements of the motion vector predictor candidate list mvpListLX, andthe value of the number of history-based motion vector predictorcandidates NumHmvpCand is greater than 0 (YES in step S2201 of FIG. 29), the processing of steps S2202 to S2209 of FIG. 29 is performed.

Subsequently, the processing of steps S2203 to S2208 of FIG. 29 isiterated until the index i changes from 1 to a smaller value of 4 andthe number of history-based motion vector predictor candidatesnumCheckedHMVPCand (steps S2202 to S2209 of FIG. 29 ). When the currentnumber of motion vector predictor candidates numCurrMvpCand is greaterthan or equal to 2, which is the maximum number of elements of themotion vector predictor candidate list mvpListLX (step S2203 of FIG. 29: NO), the processing of steps S2204 to S2209 in FIG. 29 is omitted, andthe present history-based motion vector predictor candidate derivationprocessing procedure ends. When the current number of motion vectorpredictor candidates numCurrMvpCand is smaller than 2, which is themaximum number of elements of the motion vector predictor candidate listmvpListLX (step S2203 of FIG. 29 : YES), the processing from step S2204of FIG. 29 is performed.

Subsequently, the processing of steps S2205 to S2207 is performed forY=0 and 1 (L0 and L1)(steps S2204 to S2208 of FIG. 29 ). When thecurrent number of motion vector predictor candidates numCurrMvpCand isgreater than or equal to 2, which is the maximum number of elements ofthe motion vector predictor candidate list mvpListLX (step S2205 of FIG.29 : NO the processing of steps S2206 to S2209 of FIG. 29 is omitted,and the present history-based motion vector predictor candidatederivation processing procedure ends. When the current number of motionvector predictor candidates numCurrMvpCand is smaller than 2, which isthe maximum number of elements of the motion vector predictor candidatelist mvpListLX (step S2205 of FIG. 29 : YES), the processing from stepS2206 of FIG. 29 is performed.

Subsequently, in the case of an element that has a reference indexidentical to the reference index refIdxLX of a coding/decoding targetmotion vector and that is different from any element of the motionvector predictor list mvpListLX within the history-based motion vectorpredictor candidate list HmvpCandList (YES in step S2206 of FIG. 29 ),the motion vector of LY of the history-based motion vector predictorcandidate HmvpCandList[NumHmvpCand−i] is added to a numCurrMvpCand^(th)element mvpListLX[numCurrMvpCand] when counted from a 0^(th) element ofthe motion vector predictor candidate list (step S2207 of FIG. 29 ), andthe current number of motion vector predictor candidates numCurrMvpCandis incremented by one. When there is no element that has a referenceindex identical to the reference index refIdxLX of a coding/decodingtarget motion vector and that is different from any element of themotion vector predictor list mvpListLX within the history-based motionvector predictor candidate list HmvpCandList (NO in step S2206 of FIG.29 ), the additional processing of step S2207 is skipped.

The above processing of steps S2205 to S2207 of FIG. 29 is performed forboth L0 and L1 (steps S2204 to S2208 of FIG. 29 ). When the index i isincremented by 1 and the index i is less than or equal to a smallervalue of 4 and the number of history-based motion vector predictorcandidates NumHmvpCand, the processing from step S2203 is performedagain (steps S2202 to S2209 of FIG. 29 ).

<History-Based Merging Candidate Derivation Process>

Next, a method of deriving history-based merging candidates from thehistory-based merging candidate list HmvpCandList, which is theprocessing procedure of step S404 of FIG. 21 which is a process commonto the history-based merging candidate derivation unit 345 of the normalmerge mode derivation unit 302 of the coding side and the history-basedmerging candidate derivation unit 445 of the normal merge modederivation unit 402 of the decoding side, will be described in detail.FIG. 30 is an explanatory flowchart showing the history-based mergingcandidate derivation processing procedure.

First, an initialization process is performed (step S2301 of FIG. 30 ).Each (numCurrMergeCand−1)^(th) element from 0 of isPruned[i] is set to avalue of FALSE, and a variable numOrigMergeCand is set to the number ofelements numCurrMergeCand registered in the current merging candidatelist.

Subsequently, the initial value of the index hMvpIdx is set to 1, and anaddition process of steps S2303 to S2310 of FIG. 30 is iterated untilthe index hMvpIdx changes from the initial value to NumHmvpCand (stepsS2302 to S2311 of FIG. 30 ). If the number of elements numCurrMergeCandregistered in the current merging candidate list is not smaller than orequal to (the maximum number of merging candidates MaxNumMergeCand−1),merging candidates are added to all elements of the merging candidatelist, so that the present history-based merging candidate derivationprocess ends (NO in step S2303 of FIG. 30 ). When the number of elementsnumCurrMergeCand registered in the current merging candidate list issmaller than or equal to (the maximum number of merging candidatesMaxNumMergeCand−1) (YES in step S2303 of FIG. 30 ), the processing fromstep S2304 is performed.

First, a value of FALSE is set in sameMotion (step S2304 in FIG. 30 ).Subsequently, the initial value of the index i is set to 0, and theprocessing of steps S2306 and S2307 of FIG. 30 is performed from thisinitial value to 1 (S2305 to S2308 of FIG. 30 ).

Next, a comparison is made regarding whether or not a(NumHmvpCand-hMvpIdx)^(th) element HmvpCandList[NumHmvpCand-hMvpIdx]when counted from 0 of the history-based motion vector predictorcandidate list is the same as an i^(th) element mergeCandList[i] whencounted from 0 of the merging candidate list (step S2306 in FIG. 30 ).Here, the fact that the values of the merging candidates are the sameindicates that values of all components (an inter prediction mode, areference index, and a motion vector) of the merging candidates are thesame. However, the processing of step S2306 is limited to a case inwhich hMvpIdx is larger than NumHmvpCand−2, mergeCandList[i] is aspatial merging candidate, and isPruned[i] is FALSE. If the values arethe same (YES in step S2306 of FIG. 30 ), TRUE is set for bothsameMotion and isPruned[i] (step S2307 of FIG. 30 ). If the values arenot the same (NO in step S2306 of FIG. 30 ), the processing of stepS2307 is skipped. When the iterative processing of steps S2305 to S2308of FIG. 30 is completed, a comparison is made regarding whether or notsameMotion is FALSE (step S2309 in FIG. 30 ), a(NumHmvpCand-hMvpIdx)^(th) element HmvpCandList[NumHmvpCand-hMvpIdx]when counted from 0 of the history-based motion vector predictorcandidate list is added to a numCurrMergeCand^(th) elementmergeCandList[numCurrMergeCand] of the merging candidate list whensameMotion is FALSE (YES in step S2309 in FIG. 30 ), andnumCurrMergeCand is incremented by 1 (step S2310 of FIG. 30 ). The indexhMvpIdx is incremented by 1 (step S2302 in FIG. 30 ), and the iterativeprocessing of steps S2302 to S2311 of FIG. 30 is performed.

When the checking of all elements of the history-based motion vectorpredictor candidate list is completed or when merging candidates areadded to all elements of the merging candidate list, the presenthistory-based merging candidate derivation process is completed.

<Motion-Compensated Prediction Process>

The motion-compensated prediction unit 306 acquires a position and asize of a block that is a current target of a prediction process incoding. Also, the motion-compensated prediction unit 306 acquires interprediction information from the inter prediction mode determination unit305. A reference index and a motion vector are derived from the acquiredinter prediction information, and a prediction signal is generated aftera picture signal of a position to which a reference picture identifiedby the reference index within the decoded picture memory 104 is movedfrom a position identical to that of a picture signal of a predictionblock by an amount of motion vector is acquired.

A motion-compensated prediction signal is supplied to a predictionmethod determination unit 105 using a prediction signal acquired fromone reference picture as a motion-compensated prediction signal when theinter prediction mode in the inter prediction is prediction from asingle reference picture such as L0-prediction or L1-prediction andusing a prediction signal obtained by weighted-averaging predictionsignals acquired from two reference pictures as a motion-compensatedprediction signal when the prediction mode is prediction from tworeference pictures such as an inter prediction mode of Bi-prediction.Although a weighted average ratio of bi-prediction is 1:1 here, aweighted average may be performed using another ratio. For example, aweighting ratio may increase as the picture interval between a picture,which is a prediction target, and a reference picture decreases. Also,the weighting ratio may be calculated using a corresponding tablebetween combinations of picture intervals and weighting ratios.

The motion-compensated prediction unit 406 has a function similar tothat of the motion-compensated prediction unit 306 of the coding side.The motion-compensated prediction unit 406 acquires inter predictioninformation from the normal motion vector predictor mode derivation unit401, the normal merge mode derivation unit 402, the subblock-basedmotion vector predictor mode derivation unit 403, and the subblock-basedmerge mode derivation unit 404 via the switch 408. Themotion-compensated prediction unit 406 supplies an obtainedmotion-compensated prediction signal to the decoding picture signalsuperimposition unit 207.

<About Inter Prediction Mode>

A process of performing prediction from a single reference picture isdefined as uni-prediction. In the case of uni-prediction, predictionusing either one of two reference pictures registered in reference listsL0 and L1 such as L0-prediction or L1-prediction is performed.

FIG. 32 shows the case of uni-prediction in which a clock time of areference picture (RefL0Pic) of L0 is earlier than that of a targetpicture (CurPic). FIG. 33 shows the case of uni-prediction in which aclock time of a reference picture of the L0-prediction is later thanthat of a target picture. Likewise, the reference picture ofL0-prediction of FIGS. 32 and 33 can be replaced with a referencepicture (RefL1Pic) of L1-prediction to perform uni-prediction.

The process of performing prediction from two reference pictures isdefined as bi-prediction, and the bi-prediction is represented asBi-prediction using both L0-prediction and L1-prediction. FIG. 34 showsthe case of bi-prediction in which a clock time of a reference pictureof L0-prediction is earlier than that of a target picture and a clocktime of a reference picture of L1-prediction is later than that of thetarget picture. FIG. 35 shows the case of bi-prediction in which clocktimes of the reference picture of L0-prediction and the referencepicture of L1-prediction are earlier than that of a target picture. FIG.36 shows the case of bi-prediction in which a clock time of a referencepicture of L0-prediction and a clock time of a reference picture ofL1-prediction are later than that of a target picture.

As described above, a relationship between a type of prediction of L0/L1and time can be used without being limited to L0 which is in the pastdirection and L1 which is in the future direction. In the case ofbi-prediction, each of L0-prediction and L1-prediction may be performedusing the same reference picture. Also, it is determined whether toperform motion-compensated prediction according to uni-prediction orbi-prediction on the basis of, for example, information (for example, aflag) indicating whether to use L0-prediction and whether to useL1-prediction.

<About Reference Index>

In the embodiment of the present invention, it is possible to select anoptimum reference picture from a plurality of reference pictures inmotion-compensated prediction to improve the accuracy ofmotion-compensated prediction. Thus, the reference picture used in themotion-compensated prediction is used as a reference index, and thereference index is coded in the bitstream together with the motionvector difference.

<Motion Compensation Process Based on Normal Motion Vector PredictorMode>

As shown in the inter prediction unit 102 of the coding side of FIG. 16, when inter prediction information from the normal motion vectorpredictor mode derivation unit 301 has been selected in the interprediction mode determination unit 305, the motion-compensatedprediction unit 306 acquires the inter prediction information from theinter prediction mode determination unit 305, derives an interprediction mode, a reference index, and a motion vector of a currenttarget block, and generates a motion-compensated prediction signal. Thegenerated motion-compensated prediction signal is supplied to theprediction method determination unit 105.

Likewise, as shown in the inter prediction unit 203 of the decoding sideof FIG. 22 , when the switch 408 has been connected to the normal motionvector predictor mode derivation unit 401 in the decoding process, themotion-compensated prediction unit 406 acquires inter predictioninformation from the normal motion vector predictor mode derivation unit401, derives an inter prediction mode, a reference index, and a motionvector of a current target block, and generates a motion-compensatedprediction signal. The generated motion-compensated prediction signal issupplied to the decoding picture signal superimposition unit 207.

<Motion Compensation Process Based on Normal Merge Mode>

Also, as shown in the inter prediction unit 102 in the coding side ofFIG. 16 , when inter prediction information has been selected from thenormal merge mode derivation unit 302 in the inter prediction modedetermination unit 305, the motion-compensated prediction unit 306acquires the inter prediction information from the inter prediction modedetermination unit 305, derives an inter prediction mode, a referenceindex, and a motion vector of a current target block, and generates amotion-compensated prediction signal. The generated motion-compensatedprediction signal is supplied to the prediction method determinationunit 105.

Likewise, as shown in the inter prediction unit 203 in the decoding sideof FIG. 22 , when the switch 408 has been connected to the normal mergemode derivation unit 402 in the decoding process, the motion-compensatedprediction unit 406 acquires inter prediction information from thenormal merge mode derivation unit 402, derives an inter prediction mode,a reference index, and a motion vector of a current target block, andgenerates a motion-compensated prediction signal. The generatedmotion-compensated prediction signal is supplied to the decoding picturesignal superimposition unit 207.

<Motion Compensation Process Based on Subblock-Based Motion VectorPredictor Mode>

Also, as shown in the inter prediction unit 102 on the coding side ofFIG. 16 , when inter prediction information from the subblock-basedmotion vector predictor mode derivation unit 303 has been selected inthe inter prediction mode determination unit 305, the motion-compensatedprediction unit 306 acquires the inter prediction information from theinter prediction mode determination unit 305, derives an interprediction mode, a reference index, and a motion vector of a currenttarget block, and generates a motion-compensated prediction signal. Thegenerated motion-compensated prediction signal is supplied to theprediction method determination unit 105.

Likewise, as shown in the inter prediction unit 203 in the decoding sideof FIG. 22 , when the switch 408 has been connected to thesubblock-based motion vector predictor mode derivation unit 403 in thedecoding process, the motion-compensated prediction unit 406 acquiresinter prediction information from the subblock-based motion vectorpredictor mode derivation unit 403, derives an inter prediction mode, areference index, and a motion vector of a current target block, andgenerates a motion-compensated prediction signal. The generatedmotion-compensated prediction signal is supplied to the decoding picturesignal superimposition unit 207.

<Motion Compensation Process Based on Subblock-Based Merge Mode>

Also, as shown in the inter prediction unit 102 on the coding side ofFIG. 16 , when inter prediction information from the subblock-basedmerge mode derivation unit 304 has been selected in the inter predictionmode determination unit 305, the motion-compensated prediction unit 306acquires the inter prediction information from the inter prediction modedetermination unit 305, derives an inter prediction mode, a referenceindex, and a motion vector of a current target block, and generates amotion-compensated prediction signal. The generated motion-compensatedprediction signal is supplied to the prediction method determinationunit 105.

Likewise, as shown in the inter prediction unit 203 in the decoding sideof FIG. 22 , when the switch 408 has been connected to thesubblock-based merge mode derivation unit 404 in the decoding process,the motion-compensated prediction unit 406 acquires inter predictioninformation from the subblock-based merge mode derivation unit 404,derives an inter prediction mode, a reference index, and a motion vectorof a current target block, and generates a motion-compensated predictionsignal. The generated motion-compensated prediction signal is suppliedto the decoding picture signal superimposition unit 207.

<Motion Compensation Process Based on Affine Transform Prediction>

In the normal motion vector predictor mode and the normal merge mode,motion compensation of an affine model can be used on the basis of thefollowing flags. The following flags are reflected in the followingflags on the basis of inter prediction conditions determined by theinter prediction mode determination unit 305 in the coding process andare coded in a bitstream. In the decoding process, it is determinedwhether to perform the motion compensation of the affine model on thebasis of the following flags in the bitstream.

sps_affine_enabled_flag represents whether or not motion compensation ofthe affine model can be used in inter prediction. Ifsps_affine_enabled_flag is 0, suppression is performed so that it is notmotion compensation of an affine model in units of sequences. Also,inter_affine_flag and cu_affine_type_flag are not transmitted in CU(coding block) syntax of a coding video sequence. Ifsps_affine_enabled_flag is 1, motion compensation of an affine model canbe used in a coding video sequence.

sps_affine_type_flag represents whether or not motion compensation of asix-parameter affine model can be used in inter prediction. Ifsps_affine_type_flag is 0, suppression is performed so that it is notmotion compensation of the six-parameter affine model. Also,cu_affine_type_flag is not transmitted in CU syntax of a coding videosequence. If sps_affine_type_flag is 1, motion compensation of thesix-parameter affine model can be used in the coding video sequence.When sps_affine_type_flag does not exist, it is assumed to be 0.

When a P or B slice is decoded, if inter_affine_flag is 1 in the currenttarget CU, motion compensation of the affine model is used to generate amotion-compensated prediction signal of the current target CU. Ifinter_affine_flag is 0, the affine model is not used in the currenttarget CU. When inter_affine_flag does not exist, it is assumed to be 0.

When a P or B slice is decoded, if cu_affine_type_flag is 1 in thecurrent target CU, motion compensation of a six-parameter affine modelis used to generate a motion-compensated prediction signal of thecurrent target CU. If cu_affine_type_flag is 0, motion compensation of afour-parameter affine model is used to generate a motion-compensatedprediction signal of the current target CU.

In motion compensation of an affine model, because a reference index anda motion vector are derived in units of subblocks, a motion-compensatedprediction signal is generated using a reference index or a motionvector which is a target in units of subblocks.

A four-parameter affine model is a mode in which the motion vector ofthe subblock is derived from four parameters of horizontal componentsand vertical components of motion vectors of the two control points andmotion compensation is performed in units of subblocks.

In the present embodiment, reference order when the history-based motionvector predictor candidate list is used may be further configured to bereverse order, which is the reverse of storage order. Here, when themotion information is stored from the end side of the history-basedmotion vector predictor candidate list and the motion information issequentially stored so that the motion information at the beginning sideof the history-based motion vector predictor candidate list is arrangedto be older than that at the end side thereof, the storage state issimilar to that of the present embodiment. Also, when the motioninformation is sequentially stored so that the motion information at thebeginning side of the history-based motion vector predictor candidatelist is arranged to be newer than that at the end side thereof, thestorage state is a reverse storage state, which is the reverse of thestorage state shown in the present embodiment. In the case of theabove-described reverse storage state, the reference order is set as thereverse of storage order, so that, when reference content as shown inthe present embodiment, i.e., the history-based motion vector predictorcandidate list, is referred to, it is possible to refer to motioninformation in order from oldest motion information to newly addedmotion information. Furthermore, a configuration in which a case inwhich the reference order is used as an order having the same directionas the storage order and a case in which the reference order is used asan order having a direction opposite to the storage order aredistinguished when the history-based motion vector predictor candidatelist is used may be adopted. That is, a configuration in which a case inwhich the motion information stored in the history-based motion vectorpredictor candidate list can be referred to in order from oldest motioninformation to newly added motion information and a case in which themotion information stored in the history-based motion vector predictorcandidate list can be referred to in order from newly added motioninformation to oldest motion information are distinguished when thehistory-based motion vector predictor candidate list is used may beadopted.

Also, a configuration in which a process of retrieving an element havingthe same information from the history-based motion vector predictorcandidate list and removing the retrieved element is not performed whena new element is added to the history-based motion vector predictorcandidate list may be adopted.

Further, a configuration in which a process of retrieving an elementhaving the same information from the history-based motion vectorpredictor candidate list and preventing the element having the sameinformation from being set as a normal motion vector predictor candidateis not performed when the normal motion vector predictor candidate isderived using the history-based motion vector predictor candidate listHmvpCandList in the normal motion vector predictor mode may be adopted.

<History-Based Motion Vector Predictor Candidate List>

Here, a configuration and an operation of the history-based motionvector predictor candidate list will be described.

As shown in FIG. 41 , the inter prediction information used in interprediction in a coding target block is set as an inter predictioninformation candidate hMvpCand to be registered, and the interprediction information is registered in a history-based motion vectorpredictor candidate list HmvpCandList as a history used in the past. InFIG. 41 , the history-based motion vector predictor candidate list has alist structure capable of storing six elements, and a first-in first-out(FIFO) scheme in which the elements are extracted in order from apreviously stored element is used as a basic storage operation.

Here, although an example in which the maximum number of elementscapable of being stored in HmvpCandList is six as an agreement betweenthe coding side and the decoding side will be described, the maximumnumber is not particularly limited and may be six or more. Also, themaximum number of elements capable of being stored in HmvpCandList maybe configured to be five or less. For example, HmvpCandList may beconfigured with the maximum number of elements equivalent to the maximumnumber of elements of inter prediction information candidates such asthe maximum number of elements of the motion vector predictor candidatelist mvpListLX the maximum number of merging candidates, and the maximumnumber of subblock-based merging candidates. Also, HmvpCandList may beconfigured in cooperation with the maximum number of elements of interprediction information candidates in each mode.

A configuration in which the maximum number of elements of HmvpCandListis included in a syntax element of a bitstream and therefore isdelivered from the coding side to the decoding side may be adopted.

As shown in FIG. 41 , HmvpCandList can store six elements from position0, which is the beginning of the list, to position 5, which is the endof the list, and can embed elements from position 0 to position 5. Thesepositions 0 to 5 are managed as history-based motion vector predictorindices hMvpIdx. For example, position 0 can be expressed as hMVpIdx[0]and position 5 can be expressed as hMVpIdx[5]. The number of storageelements of HmvpCandList is managed by NumHmvpCand, and theincrease/decrease in the number of storage elements is managed in therange of 0 to 6, which is the maximum number of elements.

A case in which a new element is added from the end side in a state inwhich a maximum number of elements are stored in HmvpCandList will bedescribed. As shown in FIG. 42 , when the inter prediction informationcandidate hMvpCand is intended to be newly registered as a history, theelement at position 0, which is the beginning, is removed, and thepositions of respective elements are shifted one by one in a beginningdirection. As a result of the shift, the number of storage elements isdecremented by one as shown in FIG. 43 , and therefore a new element canbe stored at position 5 of the end. Therefore, a new element is added toHmvpCandList as shown in FIG. 44 by storing the inter predictioninformation candidate hMvpCand at position 5 of the end.

Modified Example (Part 1)

As a modified example of the first embodiment, a configuration in whicha process is performed on the history-based motion vector predictorcandidate list as shown below is adopted.

<Identical Candidate Retrieval in the History-Based Motion VectorPredictor Candidate List>

When the history-based motion vector predictor candidate listHmvpCandList is used in the reference order as shown in FIG. 45 , anelement (inter prediction information) is removed from the history-basedmotion vector predictor candidate list HmvpCandList when there is interprediction having the same value as an inter prediction informationcandidate hMvpCand to be registered within the inter predictioninformation registered in the history-based motion vector predictorcandidate list HmvpCandList. A process of removing an identicalcandidate is hereafter referred to as an identical candidate removalprocess. A configuration in which the identical candidate removalprocess is not performed when an element is added to the history-basedmotion vector predictor candidate list HmvpCandList is adopted. Also, aconfiguration is adopted in which the identical candidate removalprocess is not performed when the history-based motion vector predictorcandidate list HmvpCandList is used with reference in reverse order,which is the reverse of storage order in which a new element is added tothe end of the history-based motion vector predictor candidate list asshown in FIG. 46 .

FIG. 38 is a flowchart for describing a history-based motion vectorpredictor candidate derivation processing procedure in the case of aconfiguration in which reference is performed in reverse order, which isthe reverse of storage order in which motion information is added fromthe end side, motion information is used, which is a history-basedmotion vector predictor candidate stored in the history-based motionvector predictor candidate list HmvpCandList with reference in orderfrom oldest motion information to newly added motion information, and anidentical candidate removal process is not performed.

The inter prediction information used when inter prediction is performedin the normal prediction vector mode or the normal merge mode is set asinter prediction information candidates hMvpCand to be registered, andthe inter prediction information candidates hMvpCand to be registeredare added in order from an empty position nearest to the beginning sideregardless of whether or not there is inter prediction having the samevalue as the inter prediction information candidate hMvpCand to beregistered within inter prediction information registered in thehistory-based motion vector predictor candidate list HmvpCandListprovided in the coding information storage memory 111 of the coding sideand the coding information storage memory 205 of the decoding side. WhenHmvpCandList is filled until the maximum number of elements is reached,an element (inter prediction information) at the beginning of thehistory-based motion vector predictor candidate list HmvpCandList isremoved, and the inter prediction information candidate hMvpCand to beregistered is added at the end of the history-based motion vectorpredictor candidate list HmvpCandList. The number of elements of thehistory-based motion vector predictor candidate list HmvpCandListprovided in the coding information storage memory 111 of the coding sideand the coding information storage memory 205 of the decoding side ofthe present embodiment is assumed to be 6. First, the initial setting isperformed in units of slices. The history-based motion vector predictorcandidate list HmvpCandList is initialized at the beginning of theslice, and a value of the number of history-based motion vectorpredictor candidates NumHmvpCand registered in the history-based motionvector predictor candidate list HmvpCandList is set to 0 (step S2401 ofFIG. 38 ).

Subsequently, a process of updating the history-based motion vectorpredictor candidate list HmvpCandList for each coding block within theslice is iteratively performed (steps S2402 to S2407 of FIG. 38 ). It isdetermined whether or not there is an inter prediction informationcandidate hMvpCand which is a registration target in the history-basedmotion vector predictor candidate list HmvpCandList (step S2404 in FIG.38 ). When the prediction method determination unit 105 of the codingside determines that the mode is the normal motion vector predictor modeor the normal merge mode or when the bit strings decoding unit of thedecoding side has performed decoding in the normal motion vectorpredictor mode or the normal merge mode, the inter prediction mode isassumed to be hMvpCand. When the prediction method determination unit105 of the coding side determines that the mode is the intra predictionmode, the subblock-based motion vector predictor mode, or thesubblock-based merge mode, or when the bit strings decoding unit of thedecoding side has performed decoding in the intra prediction mode, thesubblock-based motion vector predictor mode, or the subblock-based mergemode, there is no inter prediction information candidate hMvpCand whichis a registration target without performing the process of updating thehistory-based motion vector predictor candidate list HmvpCandList. Whenthere is no inter prediction information candidate hMvpCand which is aregistration target, step S2406 is skipped (step S2404 of FIG. 38 : NO).When there is an inter prediction information candidate hMvpCand whichis a registration target, the processing from step S2406 is performed(step S2404 of FIG. 38 : YES).

Next, a process of shifting and adding an element of the history-basedmotion vector predictor candidate list HmvpCandList is performed (stepS2406 of FIG. 38 ).

When the process as shown in FIG. 38 is performed, it is possible toomit a process of checking and removing an identical candidate and avariable setting or comparison process for executing the process, and toreduce an amount of processing.

Also, even if an identical candidate removal process is not performedwith respect to the history-based motion vector predictor candidate listwhen an element is added to the history-based motion vector predictorcandidate list HmvpCandList, it is possible to reduce a probability thatan identical candidate will be added to the motion vector predictorcandidate list by referring to motion information in order from oldestmotion information to newly added motion information.

Modified Example (Part 2)

As a modified example of the first embodiment, a processing procedure ofshifting and adding an element of the history-based motion vectorpredictor candidate list HmvpCandList in step S2406 of FIG. 38 isconfigured as follows.

FIG. 39 is a flowchart of the processing procedure of shifting andadding an element of the history-based motion vector predictor candidatelist HmvpCandList in step S2406 of FIG. 38 .

First, it is determined whether a new element is to be added after anelement at the beginning stored in the history-based motion vectorpredictor candidate list HmvpCandList is removed or whether a newelement is to be added without removing the element. Specifically, acomparison is made regarding whether or not NumHmvpCand is 6 (step S2541of FIG. 39 ). When NumHmvpCand is 6 (step S2541 of FIG. 39 : YES), a newelement is to be added after an element at the beginning stored in thehistory-based motion vector predictor candidate list HmvpCandList isremoved. The initial value of index i is set to a value of 1. Theelement shift process of step S2543 is iterated from this initial valueto NumHmvpCand (steps S2542 to S2544 of FIG. 39 ). By copying elementsof HmvpCandList[i] to HmvpCandList[i−1], the elements are shiftedforward (step S2543 of FIG. 39 ) and i is incremented by 1 (steps S2542and S2544 of FIG. 39 ). Subsequently, the inter prediction informationcandidate hMvpCand is added to a (NumHmvpCand−1)^(th) elementHmvpCandList[NumHmvpCand−1] when counted from 0, which corresponds tothe end of the history-based motion vector predictor candidate list(step S2545 of FIG. 39 ), and a process of shifting and adding anelement of the history-based motion vector predictor candidate listHmvpCandList ends. On the other hand, when NumHmvpCand is not 6 (stepS2541 of FIG. 39 : NO), a new element is added without removing theelement stored in the history-based motion vector predictor candidatelist HmvpCandList. The inter prediction information candidate hMvpCandis added to a (NumHmvpCand−1)^(th) element HmvpCandList[NumHmvpCand]when counted from 0, which corresponds to the end of the history-basedmotion vector predictor candidate list, and NumHmvpCand is incrementedby 1 (step S2546 of FIG. 39 ), and the process of shifting and adding anelement of the history-based motion vector predictor candidate listHmvpCandList ends.

By performing the process as shown in FIG. 39 , it is possible to omit aprocess of checking and removing an identical candidate and a variablesetting or comparison process for executing the process, and to reducean amount of processing.

Modified Example (Part 3)

In the present embodiment, a case of a configuration has been describedin which an identical candidate removal process is not performed, thehistory-based motion vector predictor candidate list HmvpCandList isused with reference in reverse order, which is the reverse of storageorder in which new motion information is added from the end side andusing motion information is used, which is a history-based motion vectorpredictor candidate stored in HmvpCandList with reference in order fromoldest motion information to newly added motion information.

In the modified example of the rust embodiment, a configuration isadopted in which a forward mode, in which reference from newly addedmotion information to old motion information is performed in a directionin which the reference order is the same as the storage order in whichmotion information is added from the end, and a reverse mode, in whichreference from oldest motion information to newly added motioninformation is performed in a direction in which the reference order isthe reverse of the storage order in which new motion information isadded from the end side, are provided, and the mode is switched betweenthe forward mode and the reverse mode using history reference flaginformation for switching the reference order of the history-basedmotion vector predictor candidate list HmvpCandList. A history referenceflag of the history reference flag information is included in a syntaxelement of a bitstream and transmitted to the decoding side, and thedecoding side is configured to be able to acquire and decode thebitstream including the history reference flag in the syntax element.

Second Embodiment

As a second embodiment, the following configuration is adopted when amotion vector predictor candidate list mvpListLX is derived. Inparticular, a configuration is adopted in which a process of determiningwhether or not an identical motion vector predictor is included in amotion vector predictor candidate list is not performed in a process ofadding a motion vector predictor candidate from a history-based motionvector predictor candidate list to the motion vector predictor candidatelist using the history-based motion vector predictor candidate listHmvpCandList with reference to information from the beginning in reverseorder, which is the reverse of storage order, in which information isnewly added from the end thereof when the motion vector predictorcandidate list mvpListLX is derived.

Hereinafter, a history-based motion vector predictor candidatederivation process of the present embodiment will be described.

<History-Based Motion Vector Predictor Candidate Derivation Process thatdoes not Involve Identical Candidate Removal Process>

Here, a history-based motion vector predictor candidate derivationprocess that does not involve an identical candidate removal processwill be described.

FIG. 47 is a flowchart for describing a history-based motion vectorpredictor candidate derivation processing procedure in the case of aconfiguration in which the identical candidate removal process is notperformed using the history-based motion vector predictor candidate listHmvpCandList with reference in reverse order, which is the reverse ofstorage order, when the motion vector predictor candidate list mvpListLXis derived.

When the current number of motion vector predictor candidatesnumCurrMvpCand is larger than or equal to the maximum number of elements(here, 2) in the motion vector predictor list mvpListLX or a value ofthe number of history-based motion vector predictor candidatesNumHmvpCand is 0 (step S2601 of FIG. 47 : NO), the processing of stepsS2602 to S2609 of FIG. 47 is omitted, and the history-based motionvector predictor candidate derivation processing procedure ends. Whenthe current number of motion vector predictor candidates numCurrMvpCandis smaller than 2, which is the maximum number of elements of the motionvector predictor list mvpListLX (step S2601 of FIG. 47 : YES), theprocessing of steps S2602 to S2609 of FIG. 47 is performed.

Subsequently, the processing of steps S2603 to S2608 of FIG. 47 isiterated until the index i changes from 0 to a value obtained bysubtracting 1 from a smaller value of between 4 and the number ofhistory-based motion vector predictor candidates NumHmvpCand (stepsS2602 to S2609 of FIG. 47 ). When the current number of motion vectorpredictor candidates numCurrMvpCand is larger than or equal to 2, whichis the maximum number of elements of the motion vector predictor listmvpListLX (step S2603 of FIG. 47 : NO), the processing of steps S2604 toS2609 of FIG. 47 is omitted, and the present history-based motion vectorpredictor candidate derivation processing procedure ends. When thecurrent number of motion vector predictor candidates numCurrMvpCand issmaller than 2, which is the maximum number of elements of the motionvector predictor list mvpListLX (step S2603 of FIG. 47 : YES), theprocessing from step S2604 of FIG. 47 is performed.

Subsequently, the processing of steps S2605 to S2607 is performed withrespect to an index Y which is 0 and 1 (L0 and L)(steps S2604 to S2608of FIG. 47 ). When the current number of motion vector predictorcandidates numCurrMvpCand is larger than or equal to 2, which is themaximum number of elements of the motion vector predictor list mvpListLX(step S2605 of FIG. 47 : NO), the processing of steps S2606 to S2609 ofFIG. 47 is omitted, and the present history-based motion vectorpredictor candidate derivation processing procedure ends. When thecurrent number of motion vector predictor candidates numCurrMvpCand issmaller than 2, which is the maximum number of elements of the motionvector predictor list mvpListLX (step S2605 of FIG. 47 : YES), theprocessing from step S2606 of FIG. 47 is performed.

Subsequently, when an element of a reference index of LY in thehistory-based motion vector predictor candidate list HmvpCandList[i] isan element of a reference index which is the same as a reference indexrefIdxLX of a coding/decoding target motion vector (step S2606 of FIG.47 : YES), a motion vector of LY of the history-based motion vectorpredictor candidate HmvpCandList[i] is added to a numCurrMvpCand^(th)element mvpListLX[numCurrMvpCand] when counted from 0 of the motionvector predictor candidate list (step S2607 in FIG. 47 ), and thecurrent number of motion vector predictor candidates numCurrMvpCand isincremented by 1. When the element of the reference index of LY in thehistory-based motion vector predictor candidate list HmvpCandList[i] isnot an element of a reference index which is the same as the referenceindex refIdxLX of the coding/decoding target motion vector (step S2606of FIG. 47 : NO), an addition process of step S2607 is skipped.

The above processing of steps S2605 to S2607 of FIG. 47 is performed atboth L0 and L1 (steps S2604 to S2608 of FIG. 47 ).

When the index i is incremented by 1 (steps S2602 and S2609 of FIG. 47 )and the index i is smaller than or equal to a value obtained bysubtracting 1 from a smaller value of 4 and the number of history-basedmotion vector predictor candidates NumHmvpCand, the processing from stepS2603 is performed again (steps S2602 to S2609 of FIG. 47 ).

It is possible to omit a process of checking and removing an identicalcandidate and a variable setting or comparison process for executing theprocess, and to reduce an amount of processing by preventing anidentical candidate removal process from being performed in a process ofperforming addition from the history-based motion vector predictorcandidate list to the motion vector predictor candidate list byperforming the history-based motion vector predictor candidatederivation process as described above.

Also, it is possible to add various types of motion information to themotion vector predictor candidate list by enabling motion information,which is a history-based motion vector predictor candidate stored inHmvpCandList, to be referred to in order from oldest motion informationto newly added motion information.

Furthermore, even if an identical candidate removal process is notperformed with respect to the history-based motion vector predictorcandidate list in a process of performing addition from thehistory-based motion vector predictor candidate list to the motionvector predictor candidate list, it is possible to reduce a probabilitythat an identical candidate will be added to the motion vector predictorcandidate list by referring to motion information in order from oldestmotion information to newly added motion information.

Modified Example (Part 1)

In the second embodiment, a case of a configuration has been describedin which an identical candidate removal process is not performed usingthe history-based motion vector predictor candidate list HmvpCandListwith reference from the beginning in reverse order, which is the reverseof storage order in which information is newly added from the end whenthe motion vector predictor candidate list mvpListLX is derived.

In the modified example of the second embodiment, as shown below, aconfiguration is adopted in which an identical candidate removal processis performed as it is so that reference from oldest motion informationto newly added motion information is performed by referring to motioninformation from the beginning in reverse order, which is the reverse ofstorage order in which motion information is newly added from the endonly with respect to reference order of the history-based motion vectorpredictor candidate list HmvpCandList.

FIG. 48 is a flowchart for describing a history-based motion vectorpredictor candidate derivation processing procedure in the case of aconfiguration in which an identical candidate removal process is notperformed using a history-based motion vector predictor candidate listHmvpCandList with reference in reverse order, which is the reverse ofstorage order.

When the current number of motion vector predictor candidatesnumCurrMvpCand is larger than or equal to the maximum number of elements(here, 2) in the motion vector predictor list mvpListLX or a value ofthe number of history-based motion vector predictor candidatesNumHmvpCand is 0 (step S2801 of FIG. 48 : NO), the processing of stepsS2802 to S2809 of FIG. 48 is omitted, and the history-based motionvector predictor candidate derivation processing procedure ends. Whenthe current number of motion vector predictor candidates numCurrMvpCandis smaller than 2, which is the maximum number of elements of the motionvector predictor list mvpListLX (step S2801 of FIG. 48 : YES), theprocessing of steps S2802 to S2809 of FIG. 48 is performed.

Subsequently, the processing of steps S2803 to S2808 of FIG. 48 isiterated until the index i changes from 0 to a value obtained bysubtracting 1 from a smaller value of between 4 and the number ofhistory-based motion vector predictor candidates NumHmvpCand (stepsS2802 to S2809 of FIG. 48 ). When the current number of motion vectorpredictor candidates numCurrMvpCand is larger than or equal to 2, whichis the maximum number of elements of the motion vector predictor listmvpListLX (step S2803 of FIG. 48 : NO), the processing of steps S2804 toS2809 of FIG. 48 is omitted, and the present history-based motion vectorpredictor candidate derivation processing procedure ends. When thecurrent number of motion vector predictor candidates numCurrMvpCand issmaller than 2, which is the maximum number of elements of the motionvector predictor list mvpListLX (step S2803 of FIG. 48 : YES), theprocessing from step S2804 of FIG. 48 is performed.

Subsequently, the processing of steps S2805 to S2807 is performed withrespect to an index Y which is 0 and 1 (L0 and L1)(steps S2804 to S2808of FIG. 48 ). When the current number of motion vector predictorcandidates numCurrMvpCand is larger than or equal to 2, which is themaximum number of elements of the motion vector predictor list mvpListLX(step S2805 of FIG. 48 : NO), the processing of steps S2806 to S2809 ofFIG. 48 is omitted, and the present history-based motion vectorpredictor candidate derivation processing procedure ends. When thecurrent number of motion vector predictor candidates numCurrMvpCand issmaller than 2, which is the maximum number of elements of the motionvector predictor list mvpListLX (step S2805 of FIG. 48 : YES), theprocessing from step S2806 of FIG. 48 is performed.

Subsequently, when an element of a reference index of LY of thehistory-based motion vector predictor candidate list HmvpCandList[i] isan element that has a reference index identical to a reference indexrefIdxLX of a coding/decoding target motion vector and that is differentfrom any element of the motion vector predictor index mvpListLX (stepS2806 of FIG. 48 : YES), a motion vector of LY of the history-basedmotion vector predictor candidate HmvpCandList[i] is added to anumCurrMvpCand^(th) element mvpListLX[numCurrMvpCand] when counted from0 of the motion vector predictor candidate list (step S2807 of FIG. 48), and the current number of motion vector predictor candidatesnumCurrMvpCand is incremented by 1. When the element of the referenceindex of LY of the history-based motion vector predictor candidate listHmvpCandList[i] is not an element that has a reference index identicalto the reference index refIdxLX of the coding/decoding target motionvector and that is different from any element of the motion vectorpredictor index mvpListLX (step S2806 of FIG. 48 : NO), an additionprocess of step S2807 is skipped.

The above processing of steps S2805 to S2807 of FIG. 48 are performed atboth L0 and L1 (steps S2804 to S2808 of FIG. 48 ).

When the index i is incremented by 1 and the index i is smaller than orequal to a value obtained by subtracting 1 from a smaller value of 4 andthe number of history-based motion vector predictor candidatesNumHmvpCand, the processing from step S2803 is performed again (stepsS2802 to S2809 of FIG. 48 ).

An identical candidate removal process is configured to be performed asit is by performing the history-based motion vector predictor candidatederivation process as described above, and the motion information whichis the history-based motion vector predictor candidate stored inHmvpCandList is enabled to be referred to in order from oldest motioninformation to newly added motion information, so that it is possible toadd more various types of motion information to the motion vectorpredictor candidate list.

Modified Example (Part 2)

As a modified example of the second embodiment, when the motion vectorpredictor candidate list mvpListLX is derived, a processing procedure ofshifting and adding an element of the history-based motion vectorpredictor candidate list HmvpCandList in step S2406 of FIG. 38 isconfigured as shown in FIG. 39 . Because the description of FIG. 39 issimilar to the above description, the description of FIG. 39 will beomitted.

By performing the process as shown in FIG. 39 , it is possible to omit aprocess of checking and removing an identical candidate and a variablesetting or comparison process for executing the process, and to reducean amount of processing.

Modified Example (Part 3)

In the second embodiment, a case of a configuration has been describedin which an identical candidate removal process is not performed, thehistory-based motion vector predictor candidate list HmvpCandList isused with reference in reverse order, which is the reverse of storageorder in which new motion information is added from the end side whenthe motion vector predictor candidate list mvpListLX is derived, andmotion information is used, which is a history-based motion vectorpredictor candidate stored in HmvpCandList with reference in order fromoldest motion information to newly added motion information. In themodified example of the second embodiment, a configuration is adopted inwhich a forward mode, in which reference from newly added motioninformation to old motion information is performed in a direction inwhich the reference order is the same as the storage order in whichmotion information is added from the end, and a reverse mode, in whichreference from oldest motion information to newly added motioninformation is performed in a direction in which the reference order isthe reverse of the storage order in which new motion information isadded from the end side, are provided, and the mode is switched betweenthe forward mode and the reverse mode using history reference flaginformation for switching the reference order of the history-basedmotion vector predictor candidate list HmvpCandList. A history referenceflag of the history reference flag information is included in a syntaxelement of a bitstream and transmitted to the decoding side, and thedecoding side is configured to be able to acquire and decode thebitstream including the history reference flag in the syntax element.

Third Embodiment

As a third embodiment, the following configuration is adopted when amerging candidate list is derived. In particular, reference order when ahistory-based motion vector predictor candidate list is used is changedso that the history-based motion vector predictor candidate list is usedwith reference in order from oldest motion information to newly addedmotion information. Also, when a new element is added to a mergingcandidate list, a change is made so that a process of retrieving anelement having the same information from the history-based motion vectorpredictor candidate list and removing the element is not performed.Further, in the normal merge mode, when a normal merging candidate isderived using a history-based motion vector predictor candidate listHmvpCandList, a change is made so that a process of retrieving anelement having the same information from the history-based motion vectorpredictor candidate list and preventing the element having the sameinformation from being set as a normal merging candidate is notperformed.

<History-Based Merging Candidate Derivation Process that does notInvolve Identical Candidate Removal Process>

Here, the history-based merging candidate derivation process that doesnot involve the same candidate removal process will be described.

FIG. 40 is a flowchart for describing a history-based merging candidatederivation processing procedure in the case of a configuration in whichan identical candidate removal process is not performed using ahistory-based motion vector predictor candidate list HmvpCandList withreference to motion information in order from oldest motion informationto newly added motion information.

First, an initialization process is performed (step S2701 of FIG. 40 ).The number of elements numCurrMergeCand registered in the currentmerging candidate list is set as a variable numOrigMergeCand.

An initial value of an index hMvpIdx is set to 0, and an additionprocess of steps S2703 to S2710 of FIG. 40 is iterated from this initialvalue to NuMHmvpCand−1 (steps S2702 to S2711 of FIG. 40 ). When thenumber of elements registered in the current merging candidate listnumCurrMergeCand is not smaller than or equal to (the maximum number ofmerging candidates MaxNumMergeCand−1), merging candidates are added toall elements in the merging candidate list, so that the presenthistory-based merging candidate derivation process ends (step S2703 ofFIG. 40 : NO). When the number of elements numCurrMergeCand registeredin the current merging candidate list is smaller than or equal to (themaximum number of merging candidates MaxNumMergeCand−1), the processingfrom step S2710 is performed (step S2703 of FIG. 40 : YES). AhMvpIdx^(th) element HmvpCandList[hMvpIdx] of the history-based motionvector predictor candidate list is added to a numCurrMergeCand^(th)element mergeCandList[numCurrMergeCand] of the merging candidate list,and numCurrMergeCand is incremented by 1 (step S2710 of FIG. 40 ). Theindex hMvpIdx is incremented by 1 (step S2702 of FIG. 40 ), and theiterative processing of steps S2702 to S2711 of FIG. 40 is performed.

When the confirmation of all the elements of the history-based motionvector predictor candidate list is completed or the merging candidatesare added to all the elements of the merging candidate list, the presenthistory-based merging candidate derivation process ends.

The identical candidate removal process is prevented from beingperformed in a process of performing addition from the history-basedmotion vector predictor candidate list to the merging candidate list byperforming the history-based merging candidate derivation process asdescribed above, so that it is possible to omit a process of checkingand removing an identical candidate and a variable setting or comparisonprocess for executing the process, and to reduce an amount ofprocessing.

Also, it is possible to add various types of motion information to themerging candidate list by enabling motion information, which is ahistory-based motion vector predictor candidate stored in HmvpCandList,to be referred to in order from oldest motion information to newly addedmotion information.

Furthermore, even if an identical candidate removal process is notperformed with respect to the history-based motion vector predictorcandidate list in a process of performing addition from thehistory-based motion vector predictor candidate list to the mergingcandidate list, it is possible to reduce a probability that an identicalcandidate will be added to the merging candidate list by referring tomotion information in order from oldest motion information to newlyadded motion information.

Modified Example (Part 1)

As a modified example of the third embodiment, a configuration isadopted in which an identical candidate removal process is not performedwhen an element is added to the history-based motion vector predictorcandidate list HmvpCandList as shown in FIG. 38 when a merging candidatelist is derived. Because the description of FIG. 38 is similar to theabove description, the description of FIG. 38 will be omitted.

By performing the process as shown in FIG. 38 , it is possible to omit aprocess of checking and removing an identical candidate and a variablesetting or comparison process for executing the process, and to reducean amount of processing.

Also, even if an identical candidate removal process is not performedwith respect to the history-based motion vector predictor candidate listwhen an element is added to the history-based motion vector predictorcandidate list HmvpCandList, it is possible to reduce a probability thatan identical candidate will be added to the merging candidate list byenabling motion information to be referred to in order from the oldestmotion information to newly added motion information.

Modified Example (Part 2)

As a modified example of the third embodiment, a processing procedure ofshifting and adding an element of the history-based motion vectorpredictor candidate list HmvpCandList of step S2406 of FIG. 38 when amerging candidate list is derived is configured as shown in FIG. 39 .Because the description of FIG. 39 is similar to the above description,the description of FIG. 39 will be omitted.

By performing the process as shown in FIG. 39 , it is possible to omit aprocess of checking and removing an identical candidate and a variablesetting or comparison process for executing the process, and to reducean amount of processing.

Modified Example (Part 3)

In the third embodiment, a case of a configuration has been described inwhich an identical candidate removal process is not performed usingmotion information, which is a history-based motion vector predictorcandidate stored in HmvpCandList, with reference to motion informationin order from oldest motion information to newly added motioninformation when the merging candidate list is derived.

In the modified example of the third embodiment, a configuration isadopted in which a forward mode, in which reference from newly addedmotion information to old motion information is performed, and a reversemode, in which reference from oldest motion information to newly addedmotion information is performed, are provided, and the mode is switchedbetween the forward mode and the reverse mode using history referenceflag information for switching the reference order of the history-basedmotion vector predictor candidate list HmvpCandList. A history referenceflag of the history reference flag information is included in a syntaxelement of a bitstream and transmitted to the decoding side, and thedecoding side is configured to be able to acquire and decode thebitstream including the history reference flag in the syntax element.

Two or more of all the embodiments described above may be combined.

In all the embodiments described above, a bitstream output by thepicture coding device has a specific data format so that the bitstreamcan be decoded in accordance with the coding method used in theembodiment. Also, a picture decoding device corresponding to the picturecoding device can decode the bitstream of the specific data format.

When a wired or wireless network is used to exchange a bitstream betweenthe picture coding device and the picture decoding device, the bitstreammay be converted into a data format suitable for a transmission form ofa communication path and may be transmitted. In this case, atransmission device for converting the bitstream output from the picturecoding device into coded data of a data format suitable for thetransmission form of the communication path and transmitting the codeddata to the network and a reception device for receiving the coded datafrom the network, restoring the coded data to the bitstream, andsupplying the bitstream to the picture decoding device are provided. Thetransmission device includes a memory that buffers the bitstream outputby the picture coding device, a packet processing unit that packetizesthe bitstream, and a transmission unit that transmits packetized codeddata via the network. The reception device includes a reception unitthat receives the packetized coded data via the network, a memory thatbuffers the received coded data, and a packet processing unit thatgenerates a bitstream by performing packet processing on the coded dataand supplies the bitstream to the picture decoding device.

Also, a display device may be provided by adding a display unit thatdisplays a picture decoded by the picture decoding device to theconfiguration. In this case, the display unit reads a decoded picturesignal generated by the decoding picture signal superimposition unit 207and stored in the decoded picture memory 208 and displays the decodedpicture signal on a screen.

Also, an imaging device may be provided by adding an imaging unit thatinputs a captured picture to the picture coding device to theconfiguration. In this case, the imaging unit inputs a captured picturesignal to the block split unit 101.

FIG. 37 shows an example of a hardware configuration of thecoding/decoding device according to the present embodiment. Thecoding/decoding device includes the configuration of the picture codingdevice and the picture decoding device according to the embodiment ofthe present invention. A related coding/decoding device 9000 includes aCPU 9001, a codec IC 9002, an I/O interface 9003, a memory 904, anoptical disc drive 9005, a network interface 9006, and a video interface9009, and the respective parts are connected by a bus 9010.

A picture coding unit 9007 and a picture decoding unit 9008 aretypically implemented as the codec IC 9002. A picture coding process ofthe picture coding device according to the embodiment of the presentinvention is executed by the picture coding unit 9007, and a picturedecoding process in the picture decoding device according to theembodiment of the present invention is performed by the picture decodingunit 9008. The I/O interface 9003 is implemented by, for example, a USBinterface, and is connected to an external keyboard 9104, a mouse 9105,and the like. The CPU 9001 controls the coding/decoding device 9000 sothat a user-desired operation is executed on the basis of a useroperation input via the I/O interface 9003. User operations using thekeyboard 9104, the mouse 9105, and the like include the selection of acoding or decoding function to be executed, setting of coding quality,designation of an input/output destination of a bitstream, designationof an input/output destination of a picture, and the like.

When the user desires an operation of reproducing a picture recorded ona disc recording medium 9100, the optical disc drive 9005 reads abitstream from the disc recording medium 91 that has been inserted andtransmits the read bitstream to the picture decoding unit 9008 of thecodec IC 9002 via the bus 9010. The picture decoding unit 9008 executesa picture decoding process on the input bitstream in the picturedecoding device according to the embodiment of the present invention andtransmits a decoded picture to an external monitor 9103 via the videointerface 9009. The coding/decoding device 9000 includes a networkinterface 9006 and can be connected to an external distribution server9106 and a portable terminal 9107 via a network 9101. When the userdesires to reproduce the picture recorded on the distribution server9106 or the portable terminal 9107 instead of the picture recorded onthe disc recording medium 9100, the network interface 9006 acquires abitstream from the network 9101 instead of reading the bitstream fromthe input disc recording medium 9100. When the user desires to reproducethe picture recorded in the memory 9004, the picture decoding process inthe picture decoding device according to the embodiment of the presentinvention is executed on the bitstream recorded in the memory 9004.

When the user desires to perform an operation of coding a picturecaptured by the external camera 9102 and recording the coded picture inthe memory 9004, the video interface 9009 inputs the picture from thecamera 9102 and transmits the picture to the picture coding unit 9007 ofthe codec IC 9002 via the bus 9010. The picture coding unit 9007executes a picture coding process on a picture input via the videointerface 9009 in the picture coding device according to the embodimentof the present invention to create a bitstream. Then, the bitstream istransmitted to the memory 9004 via the bus 9010. When the user desiresto record a bitstream on the disc recording medium 9100 instead of thememory 9004, the optical disc drive 9005 writes the bitstream to thedisc recording medium 9100 which has been inserted.

It is also possible to implement a hardware configuration that includesa picture coding device without including a picture decoding device or ahardware configuration that includes a picture decoding device withoutincluding a picture coding device. Such a hardware configuration isimplemented, for example, by replacing the codec IC 9002 with thepicture coding unit 9007 or the picture decoding unit 9008.

The above processes related to coding and decoding may be implemented asa transmission, storage, and reception device using hardware and may beimplemented by firmware stored in a read only memory (ROM), a flashmemory, or the like, or software of a computer or the like. A firmwareprogram and a software program thereof may be provided by recording theprograms on a recording medium capable of being read by a computer orthe like, or may be provided from a server through a wired or wirelessnetwork, or may be provided as data broadcasts of terrestrial orsatellite digital broadcasting.

The present invention has been described above on the basis of theembodiments. The embodiments are examples and it will be understood bythose skilled in the art that various modifications are possible incombinations of the respective components and processing processes andsuch modifications are within the scope of the present invention.

REFERENCE SIGNS LIST

-   -   100 Picture coding device    -   101 Block split unit    -   102 Inter prediction unit    -   103 Intra prediction unit    -   104 Decoded picture memory    -   105 Prediction method determination unit    -   106 Residual generation unit    -   107 Orthogonal transform/quantization unit    -   108 Bit strings coding unit    -   109 Inverse quantization/inverse orthogonal transform unit    -   110 Decoding picture signal superimposition unit    -   111 Coding information storage memory    -   200 Picture decoding device    -   201 Bit strings decoding unit    -   202 Block split unit    -   203 Inter prediction unit    -   204 Intra prediction unit    -   205 Coding information storage memory    -   206 Inverse quantization/inverse orthogonal transform unit    -   207 Decoding picture signal superimposition unit    -   208 Decoded picture memory

DRAWINGS

[FIG. 38 ]

START

S2401 INITIALIZE HISTORY-BASED MOTION VECTOR PREDICTOR CANDIDATE LISTHmvpCandLis

NumHmvpCand=0

S2402 0, . . . , NUMBER OF CODING BLOCKS WITHIN SLICE

S2404 IS THERE INTER PREDICTION INFORMATION CANDIDATE hMvpCad TO BEREGISTERED?

S2406 SHIFT ELEMENT OF HISTORY-BASED MOTION VECTOR PREDICTOR CANDIDATELIST HmvpCmdList

ADD INTER PREDICTION INFORMATION CANDIDATE hMvpCad TO HISTORY-BASEDMOTION VECTOR PREDICTOR CANDIDATE LIST HmvpCandList

HmvpCandList[tempIdx]=hMvpCand

S2407 0, . . . . NUMBER OF CODING BLOCKS WITHIN SLICE

END

[FIG. 39 ]

START

S2545 ADD INTER PREDICTION INFORMATION CANDIDATE hMvpCand TOHISTORY-BASED MOTION VECTOR PREDICTOR CANDIDATE LIST HmvpCandList

HmvpCandList[NumHmvpCand−1]=hMvpCand

S2546 ADD INTER PREDICTION INFORMATION CANDIDATE hMvpCand TOHISTORY-BASED MOTION VECTOR PREDICTOR CANDIDATE LIST HmvpCandList

HmvpCandList[NumHmvpCand++]=hMvpCand

END

[FIG. 40 ]

START

S2701 INITIALIZATION PROCESS

numOrigMerpCand=numCurrMargeCand

S2710 ADD HISTORY-BASED MOTION VECTOR PREDICTOR CANDIDATE TO MERGINGCANDIDATE LIST

mergeCandList[numCurrMergeCand++]=HmvpCandList[hMvpIdx]

END

[FIG. 41 ]

BEGINNING

END

POSITION

ELEMENT

STORAGE ORDER

[FIG. 42 ]

BEGINNING

END

POSITION

ELEMENT

STORAGE ORDER

[FIG. 43 ]

BEGINNING

END

POSITION

ELEMENT

STORAGE ORDER

[FIG. 44 ]

BEGINNING

END

POSITION

ELEMENT

STORAGE ORDER

[FIG. 45 ]

BEGINNING

END

POSITION

ELEMENT

STORAGE ORDER

REFERENCE ORDER

[FIG. 46 ]

BEGINNING

END

POSITION

ELEMENT

STORAGE ORDER

REFERENCE ORDER

[FIG. 47 ]

START

S2606 IS REFERENCE INDEX OF LY IN THE HISTORY-BASED MOTION VECTORPREDICTOR CANDIDATE LIST HmvpCandList[i] IDENTICAL TO REFERENCE INDEXrefIdxLX OF CODING/DECODING TARGET MOTION VECTOR?

S2607 ADD HISTORY-BASED MOTION VECTOR PREDICTOR CANDIDATE TO MOTIONVECTOR PREDICTOR CANDIDATE UST

MOTION VECTOR OF LY OF

mvpListLX[numCurrMvpCand++]=HmvpCandList[i]

END

[FIG. 48 ]

START

S206 IS THERE ELEMENT THAT IS ELEMENT OF REFERENCE INDEX IDENTICAL TOREFERENCE INDEX refIdxLX OF CODING/DECODING TARGET MOTION VECTOR ANDDIFFERENT FROM ANY ELEMENT OF MOTION VECTOR PREDICTOR LIST mvpListLXWITHIN HISTORY-BASED MOTION VECTOR PREDICTOR CANDIDATE LISTHmvpCandList?S2807 ADD HISTORY-BASED MOTION VECTOR PREDICTOR CANDIDATE TO MOTIONVECTOR PREDICTOR CANDIDATE LIST

MOTION VECTOR OF LY OF

mvpListLX[numCurrMvpCand++]=HmvpCandList[i]

END

The invention claimed is:
 1. A moving-picture coding device comprising:a spatial motion information candidate derivation unit configured to adda spatial motion information candidate to a motion information candidatelist, the spatial motion information candidate derived from motioninformation of a block neighboring a coding target block in a spacedomain; and a history-based motion information candidate derivation unitconfigured to add a history-based motion information candidateregistered in a history-based motion information candidate list to themotion information candidate list, wherein the history-based motioninformation candidate derivation unit adds the history-based motioninformation candidate to the motion information candidate list in orderfrom oldest motion information to newly added motion information amongthe motion information registered in the history-based motioninformation candidate list without making a comparison of the motioninformation with the spatial motion information candidate.
 2. Amoving-picture coding method comprising: a first process of adding aspatial motion information candidate to a motion information candidatelist, the spatial motion information candidate derived from motioninformation of a block neighboring a coding target block in a spacedomain; and a second process of adding a history-based motioninformation candidate registered in a history-based motion informationcandidate list to the motion information candidate list, wherein thesecond process includes adding the history-based motion informationcandidate to the motion information candidate list in order from oldestmotion information to newly added motion information among the motioninformation registered in the history-based motion information candidatelist without making a comparison of the motion information with thespatial motion information candidate.
 3. A non-transitorycomputer-readable medium having stored thereon instructions that, whenexecuted by at least one processor, cause the at least one processor toperform moving-picture coding, the moving-picture coding comprising: aspatial motion information candidate derivation unit configured to add aspatial motion information candidate to a motion information candidatelist, the spatial motion information candidate derived from motioninformation of a block neighboring a coding target block of a spacedomain; and a history-based motion information candidate derivation unitconfigured to add a history-based motion information candidateregistered in a history-based motion information candidate list to themotion information candidate list, wherein the history-based motioninformation candidate derivation unit adds the history-based motioninformation candidate to the motion information candidate list in orderfrom oldest motion information to newly added motion information amongthe motion information registered in the history-based motioninformation candidate list without making a comparison of the motioninformation with the spatial motion information candidate.
 4. Amoving-picture decoding device comprising: a spatial motion informationcandidate derivation unit configured to add a spatial motion informationcandidate to a motion information candidate list, the spatial motioninformation candidate derived from motion information of a blockneighboring a decoding target block in a space domain; and ahistory-based motion information candidate derivation unit configured toadd a history-based motion information candidate registered in ahistory-based motion information candidate list to the motioninformation candidate list, wherein the history-based motion informationcandidate derivation unit adds the history-based motion informationcandidate to the motion information candidate list in order from oldestmotion information to newly added motion information among the motioninformation registered in the history-based motion information candidatelist without making a comparison of the motion information with thespatial motion information candidate.
 5. A moving-picture decodingmethod comprising: a first process of adding a spatial motioninformation candidate to a motion information candidate list, thespatial motion information candidate derived from motion information ofa block neighboring a decoding target block in a space domain; and asecond process of adding a history-based motion information candidateregistered in a history-based motion information candidate list to themotion information candidate list, wherein the second process includesadding the history-based motion information candidate to the motioninformation candidate list in order from oldest motion information tonewly added motion information among the motion information registeredin the history-based motion information candidate list without making acomparison of the motion information with the spatial motion informationcandidate.
 6. A non-transitory computer-readable medium having storedthereon instructions that, when executed by at least one processor,cause the at least one processor to perform moving-picture decodingprogram for causing a computer to operate as: a spatial motioninformation candidate derivation unit configured to add a spatial motioninformation candidate to a motion information candidate list, thespatial motion information candidate derived from motion information ofa block neighboring a decoding target block in a space domain; and ahistory-based motion information candidate derivation unit configured toadd a history-based motion information candidate registered in ahistory-based motion information candidate list to the motioninformation candidate list, wherein the history-based motion informationcandidate derivation unit adds the history-based motion informationcandidate to the motion information candidate list in order from oldestmotion information to newly added motion information among the motioninformation registered in the history-based motion information candidatelist without making a comparison of the motion information with thespatial motion information candidate.